Apache::Hendrix::Session - Provide helper functions for Hendrix apps
use Apache::Hendrix::Session;
get '/' => sub { my $session_vars = start_session(); ....
}
By default Apache::Hendrix::Session uses a file store in /tmp. This is not very secure and should be customized to your needs. You can tell it to use any session tool that Apache::Session supports. See Configuration, below.
session_type('Apache::Session::MySQL');
session_options( { DataSource => 'dbi:mysql:sessions', #these arguments are UserName => 'MyUser', #required when using Password => '123456', #MySQL.pm LockDataSource => 'dbi:mysql:sessions', LockUserName => 'MyLockUser', LockPassword => '654321', }, );
CREATE TABLE `sessions` ( `id` char(32) NOT NULL, `a_session` text, PRIMARY KEY (`id`) )
session_type('Apache::Session::File');
session_options( { Directory => '/tmp/sessions', LockDirectory => '/tmp/sessions/lock', }, )
mkdir -p /tmp/sessions/lock sudo chown -R www-data.www.data /tmp/sessions
4 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
=back without =over
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Apache::Hendrix, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Hendrix
CPAN shell
perl -MCPAN -e shell install Apache::Hendrix
For more information on module installation, please visit the detailed CPAN module installation guide.