Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 53789
Status: resolved
Priority: 0/
Queue: MongoDB

People
Owner: Nobody in particular
Requestors: EWILHELM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.27
Fixed in: (no value)



Subject: POD in Collection.pm batch_insert does not reference @array
Please see attached patch.
Subject: Collection.pod.patch
diff --git a/lib/MongoDB/Collection.pm b/lib/MongoDB/Collection.pm index 548c312..6fb6532 100644 --- a/lib/MongoDB/Collection.pm +++ b/lib/MongoDB/Collection.pm @@ -172,9 +172,9 @@ The optional C<$options> parameter can be used to specify if this is a safe insert. A safe insert will check with the database if the insert succeeded and confess that it did not, if an error occured. -=head2 batch_insert (@array, \%options) +=head2 batch_insert (\@array, \%options) - my @ids = $collection->batch_insert(({name => "Joe"}, {name => "Fred"}, {name => "Sam"})); + my @ids = $collection->batch_insert([{name => "Joe"}, {name => "Fred"}, {name => "Sam"}]); Inserts each of the documents in the array into the database and returns an array of their _id fields.