NAME

CGIx::Session - Plugin module for CGIx to handle basic session management

VERSION

Version 0.04

SYNOPSIS

CGIx::Session is a basic module to accomodate CGIx::Core. It offers basic session management using YAML::Syck to store its data.

use CGIx::Core;
use CGIx::Session;

my $s = CGIx::Session->new;
my $c = CGIx::Core->new(view => 'main.tt');

if ($s->session('user')) {
    $c->(logged_in => 1);
    $c->redirect('account/' . $s->session('user'));
}

$s->session('user', 'Foo');

session_id

Returns a session id of the cookie

print "Session ID: " . $s->session_id;

session_flush

Closes the session properly

$s->session_flush;

session

Sets or returns a session.

$s->session('user');
$s->session('user', 'Foo');

AUTHOR

Brad Haywood <brad@geeksware.net>

LICENSE

You may distribute this code under the same terms as Perl itself.