http://www.perlmonks.org?node_id=964483


in reply to Re^4: Perl and MongoDB find error
in thread Perl and MongoDB find error

that example might have been outdated, i checked the code of module , it doesn't support

I find that hard to believe :| Actually, I do not believe it :)

Replies are listed 'Best First'.
Re^6: Perl and MongoDB find error
by Kanishka.black0 (Scribe) on May 22, 2012 at 16:35 UTC
    find is not working i check the code, it been redirected to query in for final processing , even i was unable to digest at first.

      If you look at the tests in the distribution, they don't even test ``find'' with supplied key/value pairs, per what OP wants to do. For example:

       my $some_users = $users->find({"name" => "Joe"});

      If you try this, you'll get undefined values as you iterate over the cursor.

      (example taken straight from the documentation of MongoDB::Tutorial)

      OTOH, if you try this:

      my $john = $users->find({"name" => qr/joh?n/i});

      It seems to work. (Also from the documentation.)

      How bizarre.