Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^7: Perl and MongoDB find error

by MyMonkName (Acolyte)
on Nov 06, 2012 at 23:33 UTC ( #1002604=note: print w/replies, xml ) Need Help??


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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002604]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto ;)
[Corion]: I hope you're well ;)
[marto]: running late today, get to work and people are just sitting around. "can't delete file, quota exceeded"
[Corion]: marto: Oy :-/
[Corion]: Ah, it's only "quota exceeded", not "filesystem full", so it's "merely" an administrative act to up the FS quota resp. inode quota
[Corion]: I've been on databases where I couldn't drop a table or delete rows because the DB was full. Not so much fun...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-01-24 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.