MongoDB - Official MongoDB Driver for Perl
version v0.999.999.2
This is the Beta 2 release for v1.0.0.
The v0.999.999.x releases are beta releases towards v1.0.0. While they are believed be as reliable as the stable release series, there will continue to be minor optimizations and bug fixes prior to the stable v1.0.0.
At this point, we believe the API has stabilized, but reserve the right to make minor changes.
Using the v0.999.999.x series means that you understand that your code may break due to changes in the driver between now and the v1.0.0 stable release.
More details on changes and how to upgrade applications may be found in MongoDB::Upgrading.
The next Beta release is expected around the end of June 2015. The stable v1.0.0 release is expected around the end of July 2015.
Some expected changes in future releases include:
Bug fixes, as necesary.
Profiling and optimization of common operations.
Documentation revisions.
use MongoDB; # short-hand my $client = MongoDB->connect('mongodb://localhost'); my $collection = $client->ns('foo.bar'); # database foo, collection bar my $id = $collection->insert({ some => 'data' }); my $data = $collection->find_one({ _id => $id }); # long-hand my $client = MongoDB::MongoClient->new(host => 'mongodb://localhost'); my $database = $client->get_database( 'foo' ); my $collection = $database->get_collection( 'bar' );
This is the official Perl driver for MongoDB. MongoDB is an open-source document database that provides high performance, high availability, and easy scalability.
A MongoDB server (or multi-server deployment) hosts a number of databases. A database holds a set of collections. A collection holds a set of documents. A document is a set of key-value pairs. Documents have dynamic schema. Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data.
Here are some resources for learning more about MongoDB:
MongoDB Manual
MongoDB CRUD Introduction
MongoDB Data Modeling Introductions
For getting started with the Perl driver, see these pages:
MongoDB Perl Driver Tutorial
MongoDB Perl Driver Examples
Extensive documentation and support resources are available via the MongoDB community website.
The MongoDB driver is organized into a set of classes representing different levels of abstraction and functionality.
As a user, you first create and configure a MongoDB::MongoClient object to connect to a MongoDB deployment. From that client object, you can get a MongoDB::Database object for interacting with a specific database.
From a database object you can get a MongoDB::Collection object for CRUD operations on that specific collection, or a MongoDB::GridFS object for working with an abstract file system hosted on the database. Each of those classes may return other objects for specific features or functions.
See the documentation of those classes for more details or the MongoDB Perl Driver Tutorial for an example.
Unless otherwise documented, errors result in fatal exceptions. See MongoDB::Error for a list of exception classes and error code constants.
$client = MongoDB->connect(); # localhost, port 27107 $client = MongoDB->connect($host_uri); $client = MongoDB->connect($host_uri, $options);
This function returns a MongoDB::MongoClient object. The first parameter is used as the host argument and must be a host name or connection string URI. The second argument is optional. If provided, it must be a hash reference of constructor arguments for MongoDB::MongoClient::new.
host
If an error occurs, a MongoDB::Error object will be thrown.
Starting with MongoDB v1.0.0, the driver reverts to the more-familiar three-part, version-tuple numbering scheme used by both Perl and MongoDB: vX.Y.Z
v1.0.0
vX.Y.Z
X will be incremented for incompatible API changes.
X
Even-value increments of Y indicate stable releases with new functionality. Z will be incremented for bug fixes.
Y
Z
Odd-value increments of Y indicate unstable ("development") releases that should not be used in production. Z increments have no semantic meaning; they indicate only successive development releases.
See the Changes file included with releases for an indication of the nature of changes involved.
Please report any bugs or feature requests through the issue tracker at https://jira.mongodb.org/browse/PERL. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license. https://github.com/mongodb/mongo-perl-driver
git clone https://github.com/mongodb/mongo-perl-driver.git
David Golden <david@mongodb.com>
Mike Friedman <friedo@friedo.com>
Kristina Chodorow <k.chodorow@gmail.com>
Florian Ragwitz <rafl@debian.org>
Andrew Page <andrew@infosiftr.com>
Andrey Khozov <avkhozov@gmail.com>
Ashley Willis <ashleyw@cpan.org>
Ask Bjørn Hansen <ask@develooper.com>
Brendan W. McAdams <brendan@mongodb.com>
Casey Rojas <casey.j.rojas@gmail.com>
chansen <chansen@cpan.org>
Christian Sturm <kind@gmx.at>
Christian Walde <walde.christian@googlemail.com>
Colin Cyr <ccyr@sailingyyc.com>
danny <danny@paperskymedia.com>
David Morrison <dmorrison@venda.com>
David Nadle <david@nadle.com>
David Steinbrunner <dsteinbrunner@pobox.com>
David Storch <david.storch@mongodb.com>
D. Ilmari Mannsåker <ilmari.mannsaker@net-a-porter.com>
Eric Daniels <eric.daniels@mongodb.com>
Gerard Goossen <gerard@ggoossen.net>
Glenn Fowler <cebjyre@cpan.org>
Graham Barr <gbarr@pobox.com>
Jason Carey <jason.carey@mongodb.com>
Jason Toffaletti <jason@topsy.com>
Johann Rolschewski <rolschewski@gmail.com>
Joseph Harnish <bigjoe1008@gmail.com>
Joshua Juran <jjuran@metamage.com>
J. Stewart <jstewart@langley.theshire>
Kamil Slowikowski <kslowikowski@gmail.com>
Ken Williams <kwilliams@cpan.org>
mapbuh <n.trupcheff@gmail.com>
Matthew Shopsin <matt.shopsin@mongodb.com>
Michael Langner <langner@fch.de>
Michael Rotmanov <rotmanov@sipgate.de>
Mike Dirolf <mike@mongodb.com>
nightlord <zzh_621@yahoo.com>
nightsailer <nightsailer@gmail.com>
Nuno Carvalho <mestre.smash@gmail.com>
Orlando Vazquez <ovazquez@gmail.com>
Othello Maurer <omaurer@venda.com>
Robin Lee <cheeselee@fedoraproject.org>
Roman Yerin <kid@cpan.org>
Ronald J Kimball <rkimball@pangeamedia.com>
Stephen Oberholtzer <stevie@qrpff.net>
Steve Sanbeg <stevesanbeg@buzzfeed.com>
Stuart Watt <stuart@morungos.com>
Uwe Voelker <uwe.voelker@xing.com>
Whitney.Jackson <whjackson@gmail.com>
Xtreak <tirkarthi@users.noreply.github.com>
This software is Copyright (c) 2015 by MongoDB, Inc..
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDB
CPAN shell
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.