Catalyst::Plugin::Session::State - Base class for session state preservation plugins.
package Catalyst::Plugin::Session::State::MyBackend; use base qw/Catalyst::Plugin::Session::State/;
This class doesn't actually provide any functionality, but when the Catalyst::Plugin::Session module sets up it will check to see that YourApp->isa("Catalyst::Plugin::Session::State").
Catalyst::Plugin::Session
YourApp->isa("Catalyst::Plugin::Session::State")
When you write a session state plugin you should subclass this module this reason only.
To write a session state plugin you usually need to extend two methods:
Set sessionid (accessor) at prepare time using data in the request.
sessionid
Note that this must happen before other prepare_action instances, in order to get along with Catalyst::Plugin::Session. Overriding prepare_cookies is probably the stablest approach.
prepare_action
prepare_cookies
Modify the response at to include the session ID if sessionid is defined, using whatever scheme you use. For example, set a cookie,
To install Catalyst::Plugin::Session, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Session
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Session
For more information on module installation, please visit the detailed CPAN module installation guide.