MongoDB(3pm)
π¦ MongoDB π¦
okay so this is the manpage for MongoDB (3pm), the Official MongoDB Driver for Perl β and bestie, I need you to sit down because she's EOL π. Full name situation: MongoDB β Official MongoDB Driver for Perl (EOL). The Perl side of things lives under User Contributed Perl Documentation, iykyk.
πΈ VERSION πΈ
version v2.2.2
π END OF LIFE NOTICE π
Not to be dramatic but this is the part where the music stops. π»
Version v2.2.0 was the final feature release of the MongoDB Perl driver, and version v2.2.2 is the final patch release.
As of August 13, 2020, the MongoDB Perl driver and its related libraries have reached end of life and are no longer supported by MongoDB. The rationale is right there in the August 2019 deprecation notice: https://www.mongodb.com/blog/post/the-mongodb-perl-driver-is-being-deprecated
If members of the community wish to continue development, they are welcome to fork the code under the terms of the Apache 2 license and release it under a new namespace. Specifications and test files for MongoDB drivers and libraries are published in an open repository: mongodb/specifications https://github.com/mongodb/specifications/tree/master/source.
so like... she's iconic, she's retired, and if you wanna carry the torch, the door is literally open π«Ά
β¨ SYNOPSIS β¨
use MongoDB;
my $client = MongoDB->connect('mongodb://localhost');
my $collection = $client->ns('foo.bar'); # database foo, collection bar
my $result = $collection->insert_one({ some => 'data' });
my $data = $collection->find_one({ _id => $result->inserted_id });
π DESCRIPTION π
This is the official Perl driver for MongoDB β http://www.mongodb.com. MongoDB itself is an open-source document database that gives you high performance, high availability, and easy scalability. periodt.
A MongoDB server (or a whole 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. And documents have dynamic schema β which means 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. it's giving flexibility, she's fluid π
Here are some resources for learning more about MongoDB:
- MongoDB Manual
http://docs.mongodb.org/manual/contents/ - MongoDB CRUD Introduction
http://docs.mongodb.org/manual/core/crud-introduction/ - MongoDB Data Modeling Introductions
http://docs.mongodb.org/manual/core/data-modeling-introduction/
To get 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 http://www.mongodb.org/.
π USAGE π
The MongoDB driver is organized into a set of classes representing different levels of abstraction and functionality. So like a little hierarchy of besties, each with their own job.
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::GridFSBucket 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. it's giving russian nesting dolls πͺ
See the documentation of those classes for more details, or the MongoDB Perl Driver Tutorial for an example.
MongoDB::ClientSession objects are generated from a MongoDB::MongoClient and allow for advanced consistency options, like causal-consistency and transactions. fancy.
π Error handling π
Unless otherwise documented, errors result in fatal exceptions. See MongoDB::Error for a list of exception classes and error code constants.
π₯ METHODS π₯
connect
$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.
If an error occurs, a MongoDB::Error object will be thrown.
NOTE: To connect to a replica set, a replica set name must be provided. For example, if the set name is "setA":
$client = MongoDB->connect("mongodb://example.com/?replicaSet=setA");
π SUPPORTED MONGODB VERSIONS π
The driver has been tested against MongoDB versions 2.6 through 4.2. All features of these versions are supported, except for field-level encryption. The driver may work with future versions of MongoDB, but will not include support for new MongoDB features and should be thoroughly tested within applications before deployment. no cap, test it first bestie π§ͺ
β SEMANTIC VERSIONING SCHEME β
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"
"X"will be incremented for incompatible API changes.- Even-value increments of
"Y"indicate stable releases with new functionality."Z"will be incremented for bug fixes. - 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.
π ENVIRONMENT VARIABLES π
If the "PERL_MONGO_WITH_ASSERTS" environment variable is true before the MongoDB module is loaded, then its various classes will be generated with internal type assertions enabled. This has a severe performance cost and is not recommended for production use. It may be useful in diagnosing bugs.
If the "PERL_MONGO_NO_DEP_WARNINGS" environment variable is true, then deprecated methods will not issue warnings when used. (Normally, a deprecation warning is issued once per call-site for deprecated methods.)
π§΅ THREADS π§΅
Per threads documentation, use of Perl threads is discouraged by the maintainers of Perl, and the MongoDB Perl driver does not test or provide support for use with threads. we're not doing threads in this house π
π AUTHORS π
- David Golden β
david@mongodb.com - Rassi β
rassi@mongodb.com - Mike Friedman β
friedo@friedo.com - Kristina Chodorow β
k.chodorow@gmail.com - Florian Ragwitz β
rafl@debian.org
π«Ά CONTRIBUTORS π«Ά
the way there are SO many of them. legends, all of them, genuinely π₯Ή
- Andrew Page β
andrew@infosiftr.com - Andrey Khozov β
avkhozov@gmail.com - Ashley Willis β
ashleyw@cpan.org - Ask BjΓΈrn Hansen β
ask@develooper.com - Bernard Gorman β
bernard.gorman@mongodb.com - Brendan W. McAdams β
brendan@mongodb.com - Brian Moss β
kallimachos@gmail.com - Casey Rojas β
casey.j.rojas@gmail.com - Christian Hansen β
chansen@cpan.org - Christian Sturm β
kind@gmx.at - Christian Walde β
walde.christian@googlemail.com - Colin Cyr β
ccyr@sailingyyc.com - Danny Raetzsch β
danny@paperskymedia.com - David Morrison β
dmorrison@venda.com - David Nadle β
david@nadle.com - David Steinbrunner β
dsteinbrunner@pobox.com - David Storch β
david.storch@mongodb.com - diegok β
diego@freekeylabs.com - D. Ilmari MannsΓ₯ker β
ilmari.mannsaker@net-a-porter.com - Eric Daniels β
eric.daniels@mongodb.com - Finn Kempers (Shadowcat Systems Ltd) β
toyou1995@gmail.com - Gerard Goossen β
gerard@ggoossen.net - Glenn Fowler β
cebjyre@cpan.org - Graham Barr β
gbarr@pobox.com - Hao Wu β
echowuhao@gmail.com - Harish Upadhyayula β
hupadhyayula@dealersocket.com - Jason Carey β
jason.carey@mongodb.com - Jason Toffaletti β
jason@topsy.com - Johann Rolschewski β
rolschewski@gmail.com - John A. Kunze β
jak@ucop.edu - Joseph Harnish β
bigjoe1008@gmail.com - Josh Matthews β
joshua.matthews@mongodb.com - Joshua Juran β
jjuran@metamage.com - J. Stewart β
jstewart@langley.theshire - Kamil Slowikowski β
kslowikowski@gmail.com - Ken Williams β
kwilliams@cpan.org - Matthew Shopsin β
matt.shopsin@mongodb.com - Matt S Trout β
mst@shadowcat.co.uk - Michael Langner β
langner@fch.de - Michael Rotmanov β
rotmanov@sipgate.de - Mike Dirolf β
mike@mongodb.com - Mohammad S Anwar β
mohammad.anwar@yahoo.com - Nickola Trupcheff β
n.trupcheff@gmail.com - Nigel Gregoire β
nigelg@airg.com - Niko Tyni β
ntyni@debian.org - Nuno Carvalho β
mestre.smash@gmail.com - Orlando Vazquez β
ovazquez@gmail.com - Othello Maurer β
omaurer@venda.com - Pan Fan β
nightsailer@gmail.com - Pavel Denisov β
pavel.a.denisov@gmail.com - Rahul Dhodapkar β
rahul@mongodb.com - Robert Sedlacek (Shadowcat Systems Ltd) β
phaylon@cpan.org - Robin Lee β
cheeselee@fedoraproject.org - Roman Yerin β
kid@cpan.org - Ronald J Kimball β
rkimball@pangeamedia.com - Ryan Chipman β
ryan@ryanchipman.com - Slaven Rezic β
slaven.rezic@idealo.de - Slaven Rezic β
srezic@cpan.org - Stephen Oberholtzer β
stevie@qrpff.net - Steve Sanbeg β
stevesanbeg@buzzfeed.com - Stuart Watt β
stuart@morungos.com - Thomas Bloor (Shadowcat Systems Ltd) β
tbsliver@cpan.org - Tobias Leich β
email@froggs.de - Uwe Voelker β
uwe.voelker@xing.com - Wallace Reis β
wallace@reis.me - Wan Bachtiar β
sindbach@gmail.com - Whitney Jackson β
whjackson@gmail.com - Xavier Guimard β
x.guimard@free.fr - Xtreak β
tirkarthi@users.noreply.github.com - Zhihong Zhang β
zzh_621@yahoo.com
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2020 by MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
and that's the whole thing, bestie π this page came to you via perl v5.40.1, dated 2025-04-03, and it's filed as MongoDB(3pm). go forth and query responsibly β¨π¦πΈ
π¦ where this page comes from
- debian trixie: libmongodb-perl 2.2.2-3 Β· Apache-2.0
- ubuntu resolute: libmongodb-perl 2.2.2-3 Β· Apache-2.0
- ubuntu stonking: libmongodb-perl 2.2.2-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms