The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::Hendrix::Session - Provide helper functions for Hendrix apps

SYNOPSIS

use Apache::Hendrix::Session;

get '/' => sub { my $session_vars = start_session(); ....

}

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.

CONFIGURATION

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', }, );

Session Table Structure

CREATE TABLE `sessions` ( `id` char(32) NOT NULL, `a_session` text, PRIMARY KEY (`id`) )

File

session_type('Apache::Session::File');

session_options( { Directory => '/tmp/sessions', LockDirectory => '/tmp/sessions/lock', }, )

File System Layout

 mkdir -p /tmp/sessions/lock

 sudo chown -R www-data.www.data /tmp/sessions

REQUIRED LIBS

Apache2::Request;
Apache::Hendrix;
Module::Load;
Moose;
MooseX::ClassAttribute;
MooseX::FollowPBP;

REVISION HISTORY

0.1.0 - Initial concept

AUTHOR

Zack Allison

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 116:

You forgot a '=back' before '=head2'

Around line 154:

=back without =over

Around line 177:

'=item' outside of any '=over'

Around line 179:

You forgot a '=back' before '=head1'