MojoX::Session::Store::MongoDB - MongoDB Store for MojoX::Session
my $session = MojoX::Session->new( tx => $tx, store => MojoX::Session::Store::MongoDB->new({ host => '127.0.0.1', port => 27017, database => 'some_app', collection => 'sessions', }), transport => MojoX::Session::Transport::Cookie->new, ); # see doc for MojoX::Session
MojoX::Session::Store::MongoDB is a store for MojoX::Session that stores a session in a MongoDB database.
MojoX::Session::Store::MongoDB implements the following attributes.
mongodb
my $db = $store->mongodb;
Get and set MongoDB::Database object.
mongodb_coll
my $collection = $store->mongodb_coll;
Get and set MongoDB::Collection object.
MojoX::Session::Store::MongoDB inherits all methods from MojoX::Session::Store.
new
new uses the database and collection parameters for the database name and the collection name respectively. All other parameters are passed to MongoDB::Connection-new()>.
MongoDB::Connection-
Instead of the database name you can also pass in a mongodb parameter with a MongoDB::Database object.
database
create
Insert session to MongoDB.
update
Update session in MongoDB.
load
Load session from MongoDB.
delete
Delete session from MongoDB.
git repository etc at http://github.com/abh/MojoX-Session-Store-MongoDB.
Ask Bjørn Hansen <ask@develooper.com>
Copyright (C) 2009 Ask Bjørn Hansen and Develooper LLC.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Bjørn'. Assuming UTF-8
To install MojoX::Session::Store::MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Session::Store::MongoDB
CPAN shell
perl -MCPAN -e shell install MojoX::Session::Store::MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.