=pod =encoding UTF-8 =head1 NAME Catalyst::Plugin::Session::State::Stash - Maintain session IDs using the stash =head1 VERSION version 0.14 =head1 SYNOPSIS use Catalyst qw/Session Session::State::Stash Session::Store::Foo/; =head1 DESCRIPTION An alternative state storage plugin that allows you some more flexibility in dealing with session storage. This plugin loads and saves the session ID from and to the stash. =head1 METHODS =over 4 =item delete_session_id Deletes the session. Unfortunately I've been unable to squash a bug that will stop you from opening a new session in the same execution, however. Patches welcome! =item get_session_id Gets the current session id. =item set_session_id Sets the session id to the C. =item get_session_expires Gets when the current session expires. =item set_session_expires Sets how many seconds from now the session should expire. =back =head1 EXTENDED METHODS =over 4 =item prepare_action Loads the id off the stash. =item setup_session Defaults the C parameter to C<_session>. =back =head1 CONFIGURATION =over 4 =item stash_key The name of the hash key to use. Defaults to C<_session>. =item stash_delim If present, splits C at this character to nest. E.g. a C of '/' and C of '123/456' will store it as $c->stash->{123}->{456} =item expires How long the session should last in seconds. =back For example, you could stick this in F: __PACKAGE__->config( 'Plugin::Session' => { stash_key => 'session_id', }); =head1 BUGS You can't delete a session then create a new one. If this is important to you, patches welcome! =head1 CAVEATS Manual work may be involved to make better use of this. =for stopwords stateful If you are writing a stateful web service with L, you will probably only have to deal with loading, as when saving, the ID will already be on the stash. =head1 SEE ALSO L, L, L, L (what you probably want). =head1 AUTHOR James Laver =head1 CONTRIBUTORS =over 4 =item * This module is derived from L code. Thanks to anyone who wrote code for that. =item * Thanks to Kent Fredric for a patch for nested keys =back =for stopwords Florian Ragwitz Karen Etheridge Tomas Doran James Laver =over 4 =item * Florian Ragwitz =item * Karen Etheridge =item * Tomas Doran =item * James Laver =item * James Laver =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by James Laver. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut