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

NAME

Mojolicious::Plugin::SimpleSession - Exceedingly Simple Mojolicious Sessions

VERSION

Version 0.01

SYNOPSIS

In the handler subroutine of your Mojolicious application, add:

    $self->plugin('simple_session');

That's it!

Inside your application, you can now reference a hashref called 'session' in the stash, like this:

    my $count = $self->stash->{session}->{count};

    $count++;
    $self->stash->{session}->{count} = $count;

Session data is preserved across requests for this user (identified by their cookie).

If you need to be able to control expiry, use a database store, or basically do anything more intelligent with your sessions, you probably want to look at Mojolicious::Plugin::Session.

FUNCTIONS

register

Called by the Mojolicious framework when the plugin is registered.

AUTHOR

Justin Hawkins, <justin at cpan.org>

BUGS

Please report any bugs or feature requests to bug-mojolicious-plugin-simplesession at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojolicious-Plugin-SimpleSession. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Mojolicious::Plugin::SimpleSession

You can also look for information at: http://hawkins.id.au/notes/perl/modules/mojolicious::plugin::simplesession

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2010 Justin Hawkins.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.