Tie::Hash::MongoDB - Tie a hash to a MongoDB document
Every single action to the hash is directly processed on the MongoDB server, remember this while using this module!
Version 0.01
use Tie::Hash::MongoDB; tie %foo,'Tie::Hash::MongoDB',$id,{ server => 'localhost', database => 'default', collection => 'default', };
Tie a MongoDB document to a Perl hash.
tie arguments: 1. the hash to be tied 2. this modules name 3. the document id or undef for a new document 4. connection arguments for the MongoDB interface
tie %foo,'Tie::Hash::MongoDB',$id,{ server => 'localhost', database => 'default', collection => 'default', };
Tie the MongoDB document or create a new one.
$object->DELETE($key)
Remove a key from the document.
No return value.
$object->EXISTS($key)
Returns true if the key exists or false otherwise.
$object->FETCH($key)
Returns the current value of a key.
Returns undef if the key doesn't exist or has an undef value.
$object->FIRSTKEY
Returns the first key of the document.
$object->NEXTKEY
Returns the next key of the document or nothing at the end of the list.
$object->STORE($key,$value)
Add or update a key.
$object->UNTIE
Unties the hash from the document.
Sebastian Willing, <sewi at cpan.org>
<sewi at cpan.org>
Please report any bugs or feature requests to bug-tie-hash-mongodb at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Tie-Hash-MongoDB. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-tie-hash-mongodb at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Tie::Hash::MongoDB
You can also look for information at:
Author's blog:
http://www.pal-blog.de/entwicklung/perl/2011/creating-tiehashmongodb-from-scratch-using-padre.html http://www.pal-blog.de/entwicklung/perl/2011/finishing-tiehashmongodb.html
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tie-Hash-MongoDB
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Tie-Hash-MongoDB
CPAN Ratings
http://cpanratings.perl.org/d/Tie-Hash-MongoDB
Search CPAN
http://search.cpan.org/dist/Tie-Hash-MongoDB/
Copyright 2011 Sebastian Willing.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Tie::Hash::MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Hash::MongoDB
CPAN shell
perl -MCPAN -e shell install Tie::Hash::MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.