Egg::Model::Session::Base::DBIC - Session management by DBIC.
package MyApp::Model::Sesion; __PACKAGE__->config( dbic => { label_schema => 'dbic_schma_label', label_source => 'dbic_moniker_label', id_field => 'id', data_field => 'a_session', time_field => 'lastmod', }, ); __PACKAGE__->startup( Base::DBIC Store::Base64 ID::SHA1 Bind::Cookie );
The session data is preserved by using DBIC.
'Egg::Model::DBIC' should be able to be used for use.
And, 'Base::DBIC' is added to startup of the component module generated with Egg::Helper::Model::Session. Base::FileCache of default's It is not possible to cooperate and delete it, please.
Moreover, it is necessary to load Store system module to treat the session data appropriately.
__PACKAGE__->startup( Base::DBIC Store::Base64 ID::SHA1 Bind::Cookie );
If AutoCommit is invalid and 'Egg::Plugin::DBIC' is effective in the setting of DBI, it is late commit.
It sets in config of the session component module and it sets it to 'dbic' item with HASH.
__PACKAGE__->config( dbic => { ....... }, );
It is Ra bell name because it obtains Schame of Egg::Model::DBIC.
The exception is generated in case of undefined.
Label name to obtain source object of session table from Egg::Model::DBIC.
Name of session ID column.
'id' is used in case of undefined.
Name of session data column.
'a_session' is used in case of undefined.
Name of updated day and hour column.
'lastmod' is used in case of undefined.
Because most of these methods is the one that Egg::Model::Session internally uses it, it is not necessary to usually consider it on the application side.
The source object of the session table is returned from Egg::Model::DBIC.
If AutoCommit is effective, the transaction is begun. If it is invalid, nothing is done.
If AutoCommit is effective, the transaction is shut. If it is invalid, committing does the rollback if 'is_update' is effective.
If AutoCommit is invalid, nothing is done.
When the result of 'restore' is preserved, it is returned.
The content of 'id_filed' of the configuration is returned.
The content of 'data_filed' of the configuration is returned.
The content of 'time_field' of the configuration is returned.
The session data obtained by received SESSION_ID is returned.
When SESSION_ID is not obtained, it acquires it in 'session_id' method.
New session data is preserved.
SESSION_DATA is indispensable.
Existing session data is updated.
After Egg::Model::Session::Manager::TieHash, commit is done.
However, if 'is_update' method is invalid, rollback is issued. In a word, if data was not substituted for the session, the data is annulled.
Egg::Release, Egg::Model::Session, Egg::Model::Session::Manager::Base, Egg::Model::Session::Manager::TieHash, Egg::Model, Egg::Model::DBIC, Time::Piece::MySQL,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Plugin::SessionKit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Plugin::SessionKit
CPAN shell
perl -MCPAN -e shell install Egg::Plugin::SessionKit
For more information on module installation, please visit the detailed CPAN module installation guide.