Em outras palavras, como fazer o find tratar a função como função e não como string. http://search.cpan.org/~kristina/MongoDB-0.40/lib/MongoDB/DataTypes.pod http://www.mongodb.org/display/DOCS/Object+IDs
Ainda estou procurando :P 2011/1/11 Daniel de Oliveira Mantovani <[email protected]>: > Pessoal, estou eu preciso fazer um find, usando o > http://search.cpan.org/~kristina/MongoDB-0.40/lib/MongoDB.pm > > O find é equivalente a esse código, usando o Mongo cliente. > > db.Foo.find({_id : ObjectId("4d2935a35a25524b32190000")}) > > Porém, fazendo isso usando o API em Perl, ele trata o "ObjectId" como > uma string. > find({_id => "ObjectID(4d2a0fae9e0a3b4b32f70000"}) > > Que é o equivalente a fazer isso no Mongo Cliente. > db.Foo.find({_id : "ObjectId(4d2935a35a25524b32190000)"}) > > A pergunta é, como fazer o equivalente a isso no Mongo cliente: > > db.Foo.find({_id : ObjectId("4d2935a35a25524b32190000")}) > > usando Perl. > > http://stackoverflow.com/questions/4659437/how-to-use-find-to-seach-id-objectidid-in-perl-api > > -- > "If you’ve never written anything thoughtful, then you’ve never had > any difficult, important, or interesting thoughts. That’s the secret: > people who don’t write, are people who don’t think." > -- "If you’ve never written anything thoughtful, then you’ve never had any difficult, important, or interesting thoughts. That’s the secret: people who don’t write, are people who don’t think." =begin disclaimer Sao Paulo Perl Mongers: http://sao-paulo.pm.org/ SaoPaulo-pm mailing list: [email protected] L<http://mail.pm.org/mailman/listinfo/saopaulo-pm> =end disclaimer
