25 Feb 2011 21:32:59 UTC
- Distribution: MongoDBx-AutoDeref
- Module version: 1.110560
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone git repository
- Issues (2)
- Testers (585 / 186 / 0)
- KwaliteeBus factor: 0
- 63.74% Coverage
- License: perl_5
- Activity24 month
- Download (12.8KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionNPEREZ Nicholas Perez
- COPYRIGHT AND LICENSE
MongoDBx::AutoDeref::DBRef - DBRef representation in Perl
MongoDBx::AutoDeref::DBRef is the Perl space representation of Mongo database references. These ideally shouldn't be constructed manually, but instead should be constructed by the internal MongoDBx::AutoDeref::LookMeUp class.
is: ro, isa: MongoDB::Connection, required: 1
In order to defer fetching the referenced document, a connection object needs to be accessible. This is required for construction of the object.
is: ro, isa: MongoDB::OID, reader: id, required: 1
This is the OID of the object.
is: ro, isa: Str, reader: ref, required: 1
This is the collection in which this item resides.
is: ro, isa: Str, reader: db, required: 1
This is the database in which this item resides.
is: ro, isa: MongoDBx::AutoDeref::LookMeUp, weak_ref: 1, required: 1
When fetching referenced documents, those documents may in turn reference other documents. By providing a LookMeUp object, those other references can also be travered as DBRefs.
This method returns a hash reference in the DBRef format suitable for MongoDB serialization.
fetch also accepts a hashref of fields-as-keys that will be passed unaltered directly to the MongoDB driver as a way to limit the fields pulled back.
Nicholas R. Perez <firstname.lastname@example.org>
This software is copyright (c) 2010 by Nicholas R. Perez <email@example.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install MongoDBx::AutoDeref, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install MongoDBx::AutoDeref
For more information on module installation, please visit the detailed CPAN module installation guide.