CGI::MxScreen::Session::Medium - Abstract session saving medium
# Not meant to be used directly
This class is deferred, and is meant to be inherited from by classes implementing the various session media.
The following session media are currently supported:
CGI::MxScreen::Session::Medium::Browser
This saves the session within the browser, and therefore does not require any storage on the server side. See CGI::MxScreen::Session::Medium::Browser for configuration details.
CGI::MxScreen::Session::Medium::File
This saves the session within a file, on the server side. See CGI::MxScreen::Session::Medium::File for configuration details.
CGI::MxScreen::Session::Medium::Raw_File
This saves the session within a file, on the server side, but bypasses the CGI::MxScreen::Serializer interface alltogether to make raw Storable calls, i.e. store() and retrieve().
CGI::MxScreen::Serializer
Storable
store()
retrieve()
This is more efficient but prevents any compression (which a CPU intensive task anyway). As often, we're sacrifying space and genericity for performance. See CGI::MxScreen::Session::Medium::Raw_File for configuration details.
This section is meant for developpers wishing to implement their own session medium. You don't need to read it if you're only using CGI::MxScreen.
CGI::MxScreen
These features need to be defined by heirs:
is_available
Looks whether session_id is a free session ID. If it is, atomically reserve it.
Must return true when the ID was reserved, false if it is not available.
make
The creation routine, whose interface will necessarily be different for every medium.
retrieve
Retrieve context by session ID, and return a reference to it.
session_id
Retrieve session ID from the CGI environment (probably in some hidden parameter). If there's no session ID there, return undef.
undef
store
Store context by session ID.
It returns a hash ref of (parameter => value) tuples to be generated as hidden parameters to identify the session.
The only attribute is:
serializer
The CGI::MxScreen::Serializer object to use for serialization. It is initialized by CGI::MxScreen::Session with a set_serializer() call.
CGI::MxScreen::Session
set_serializer()
Raphael Manfredi <Raphael_Manfredi@pobox.com>
CGI::MxScreen::Session::Medium::Browser(3), CGI::MxScreen::Session::Medium::File(3), CGI::MxScreen::Session::Medium::Raw_File(3).
To install CGI::MxScreen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::MxScreen
CPAN shell
perl -MCPAN -e shell install CGI::MxScreen
For more information on module installation, please visit the detailed CPAN module installation guide.