AnyEvent::MongoDB -- Asynchronous MongoDB client using AnyEvent
use AnyEvent::MongoDB; my $mongo = AnyEvent::MongoDB->new( uri => "mongodb:localhost:27017,localhost:27018", ); my $db = $mongo->get_database('test'); my $col = $db->get_collection('collection'); $col->find({name => "foo"}, sub { require Data::Dumper; print Data::Dumper::Dumper(\@_); });
This is considered as alpha quality software. Most of the stuff are undocumented since it's considered unstable and will likely to change.
AnyEvent::MongoDB is a client for http://www.mongodb.org/|MongoDB using AnyEvent.
AnyEvent::MongoDB
To avoid re-implementing things it uses and introducing new bugs, it uses the BSON encode and decode routines from MongoDB. See MongoDB::DataTypes for details of how the encode and decode work
MongoDB, MongoDB::DataTypes
Graham Barr <gbarr@pobox.com>
Copyright (C) 2010 by Graham Barr.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AnyEvent::MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::MongoDB
CPAN shell
perl -MCPAN -e shell install AnyEvent::MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.