Mojolicious::Plugin::Session - Session plugin for Mojolicious
# Mojolicious::Lite plugin session => {stash_key => 'mojox-session', store => 'dbi', expires_delta => 5}; # Mojolicious $self->plugin( session => { stash_key => 'mojox-session', store => 'dbi', expires_delta => 5 } );
Embedded Mojo sessions are recommended for using instead of this module.
Mojolicious::Plugin::Session is a session plugin for Mojolicious. It creates MojoX::Session instance with provided parameters, passes $tx object before dispatch method is called and calls flush just after dispatching. MojoX::Session instance is placed in the stash.
Mojolicious::Plugin::Session accepts all the attributes accepted by MojoX::Session and implements the following.
stash_key
MojoX::Session instance will be saved in stash using this key.
MojoX::Session
Mojolicious
To install MojoX::Session, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Session
CPAN shell
perl -MCPAN -e shell install MojoX::Session
For more information on module installation, please visit the detailed CPAN module installation guide.