Apache-Hendrix
view release on metacpan or search on metacpan
lib/Apache/Hendrix/Session.pm view on Meta::CPAN
Apache::Hendrix::Session - Provide helper functions for Hendrix apps
=head1 SYNOPSIS
use Apache::Hendrix::Session;
get '/' => sub {
my $session_vars = start_session();
....
}
=head1 DETAILS
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.
=head1 CONFIGURATION
=over
=head2 MySQL
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',
},
);
=head2 Session Table Structure
CREATE TABLE `sessions` (
`id` char(32) NOT NULL,
`a_session` text,
PRIMARY KEY (`id`)
)
=head2 File
session_type('Apache::Session::File');
session_options( {
Directory => '/tmp/sessions',
LockDirectory => '/tmp/sessions/lock',
},
)
=head2 File System Layout
mkdir -p /tmp/sessions/lock
sudo chown -R www-data.www.data /tmp/sessions
=back
=head1 REQUIRED LIBS
=over
=item Apache2::Request;
=item Apache::Hendrix;
=item Module::Load;
=item Moose;
=item MooseX::ClassAttribute;
=item MooseX::FollowPBP;
=back
=head1 REVISION HISTORY
=item 0.1.0 - Initial concept
=head1 AUTHOR
=over
=item Zack Allison
=back
=cut
( run in 0.582 second using v1.01-cache-2.11-cpan-71847e10f99 )