From 625e5eb04a84a1f9decb848ada27ddef917b6759 Mon Sep 17 00:00:00 2001 From: diegok Date: Fri, 18 Mar 2016 09:29:18 +0100 Subject: [PATCH] Replace deprecated methods from MongoDB::Collection POD examples --- lib/MongoDB/Collection.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MongoDB/Collection.pm b/lib/MongoDB/Collection.pm index b0051083..9d8aef02 100644 --- a/lib/MongoDB/Collection.pm +++ b/lib/MongoDB/Collection.pm @@ -1226,8 +1226,8 @@ sub drop { =method ordered_bulk $bulk = $coll->ordered_bulk; - $bulk->insert( $doc1 ); - $bulk->insert( $doc2 ); + $bulk->insert_one( $doc1 ); + $bulk->insert_one( $doc2 ); ... $result = $bulk->execute; @@ -1883,7 +1883,7 @@ are recommended: use Safe::Isa; # provides $_isa try { - $coll->insert( $doc ) + $coll->insert_one( $doc ) } catch { if ( $_->$_isa("MongoDB::DuplicateKeyError" ) {