MongoDBx::AutoDeref::LookMeUp - Provides the sieve that replaces DBRefs with deferred scalars.
version 1.110520
This module provides the guts for MongoDBx::AutoDeref. It modifies documents in place to replace DBRefs with defered lookups of the actual document.
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: Data::Visitor::Callback lazy: 1, builder => _build_visitor handles: sieve => visit
In order to find the DBRefs within the returned document, Data::Visitor is used to traverse the structure. This attribute is built using the provided builder with the default "hash_visit_action" setup to build the lazy look up.
is: ro, isa: CodeRef builder: _build_hash_visit_action lazy: 1
This attribute holds the code reference that will be executed upon each hash found within the data structure returned from MongoDB. By default, the coderef built using the builder method uses "lazy" in Scalar::Defer to defer lookup of the referenced document until access time.
(HashRef)
This method takes the returned document from MongoDB and traverses it to replace DBRefs with defered lookups of the actual document. It does this IN PLACE on the document.
Nicholas R. Perez <nperez@cpan.org>
This software is copyright (c) 2010 by Nicholas R. Perez <nperez@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MongoDBx::AutoDeref, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDBx::AutoDeref
CPAN shell
perl -MCPAN -e shell install MongoDBx::AutoDeref
For more information on module installation, please visit the detailed CPAN module installation guide.