The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MongoDB - Official MongoDB Driver for Perl

VERSION

version v0.999.998.1

This is the Alpha 1 release for v1.0.0.0.

ALPHA RELEASE NOTICE AND ROADMAP

The v0.999.998.x releases are alpha releases towards v1.0.0.0. While they are believed be as reliable as the stable release series, the implementation and API are still subject to change. While preserving back-compatibility is important and will be delivered to a great extent, it will not be guaranteed.

Using the v0.999.998.x series means that you understand that your code may break due to changes in the driver between now and the v1.0.0.0 stable release.

This alpha 1 release includes these major changes:

  • All networking code is implemented in pure-Perl. SSL support is provided by IO::Socket::SSL (if installed). Likewise, SASL authentication support is provided by Authen::SASL backends (if installed). This should improve portability and ease installation.

  • Server monitoring and failover are significantly improved.

  • Expanded use of exceptions for error handling.

More details on changes and how to upgrade applications may be found in MongoDB::Upgrading.

Roadmap

Subsequent alphas will be released approximately monthly. The v1.0.0.0 release is expected in the middle of 2015.

Some expected (but not guaranteed) changes in future releases include:

  • The driver will become pure-Perl capable, using the Moo framework instead of Moose.

  • BSON encoding will be extracted to a separate module, with both pure-Perl and C variants available.

  • Transformation of Perl data structures to/from BSON will become more customizable.

  • An exception-based error system will be used exclusively throughout the driver.

  • Some existing options and methods will be deprecated to improve consistency and clarity of what remains.

  • Some configuration options and method return values will be implemented with objects for validation and interface consistency.

  • Various internal changes to support new protocol capabilities of MongoDB 2.6 and later.

  • The driver will have a smaller total dependency tree.

  • Documentation will be significantly revised.

SYNOPSIS

    use MongoDB;

    my $client     = MongoDB::MongoClient->new(host => 'localhost', port => 27017);
    my $database   = $client->get_database( 'foo' );
    my $collection = $database->get_collection( 'bar' );
    my $id         = $collection->insert({ some => 'data' });
    my $data       = $collection->find_one({ _id => $id });

DESCRIPTION

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:

For getting started with the Perl driver, see these pages:

Extensive documentation and support resources are available via the MongoDB community website.

USAGE

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.

SEMANTIC VERSIONING SCHEME

Starting with MongoDB v0.704.0.0, the driver will be using a modified semantic versioning scheme.

Versions will have a vX.Y.Z.N tuple scheme with the following properties:

  • X will be incremented for incompatible API changes

  • Y will be incremented for new functionality that is backwards compatible

  • Z will be incremented for backwards-compatible bug fixes

  • N will be zero for a stable release; N will be non-zero for development releases

We use N because CPAN does not support pre-release version labels (e.g. "-alpha1") and requires non-decreasing version numbers for releases.

When N is non-zero, X, Y, and Z have no semantic meaning except to indicate the last stable release.

For example, v0.704.0.1 is merely the first development release after v0.704.0.0. The next stable release could be a bug fix (v0.704.1.0), a feature enhancement (v0.705.0.0), or an API change (v1.0.0.0).

See the Changes file included with development releases for an indication of the nature of changes involved.

SUPPORT

Bugs / Feature Requests

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.

Source Code

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

AUTHORS

  • David Golden <david@mongodb.com>

  • Mike Friedman <friedo@mongodb.com>

  • Kristina Chodorow <kristina@mongodb.com>

  • Florian Ragwitz <rafl@debian.org>

CONTRIBUTORS

  • 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>

  • Christian Sturm <kind@gmx.at>

  • 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>

  • 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>

  • Mike Friedman <mike.friedman@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>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by MongoDB, Inc..

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004