-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hi,
I try to setup a mongodb clusten at mongodb.net and play arount with perl modules Mango and MongoDB
unfortunately if I run a simple test with Mango - the test failed
I'm not sure if is it a bug therefore could you check what the issue is or what I'm doing wrong ?
Thanks
Perl version
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
cpanm Mango
Mango is up to date. (1.29)
Cluster0-shard-0:PRIMARY> db.version()
3.2.16
Cluster0-shard-0:PRIMARY>
`#!perl
use DDP;
use Mango;
my $mango = Mango->new('mongodb://testadmin:password-wihout-special-chart@cluster0-shard-00-00-nrhyy.mongodb.net:27017,cluster0-shard-00-01-nrhyy.mongodb.net:27017,cluster0-shard-00-02-nrhyy.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin');
my $oid = $mango->db('test')->collection('foo')->insert({bar => 'baz'});
my $doc = $mango->db('test')->collection('foo')->find_one({bar => 'baz'});
p $doc->{bar};`
DEBUG
MANGO_DEBUG=1 perl mango.pl
-- Operation #1 (query)
[
"test.$cmd",
{},
0,
-1,
{
"documents" => [
{
"_id" => bless( {}, 'Mango::BSON::ObjectID' ),
"bar" => "baz"
}
],
"insert" => "foo",
"ordered" => \1,
"writeConcern" => {
"j" => \0,
"w" => 1,
"wtimeout" => 1000
}
},
{}
]
-- New connection (cluster0-shard-00-00-nrhyy.mongodb.net:27017:1)
-- Operation #2 (query)
[
"test.$cmd",
{},
0,
-1,
{
"isMaster" => 1
},
{}
]
-- Client >>> Server (#2)
Premature connection close at /usr/local/share/perl/5.22.1/Mango/Database.pm line 65.