Web::ComposableRequest::Role::Session - Adds a session object to the request
package Your::Request::Class; use Moo; extends 'Web::ComposableRequest::Base'; with 'Web::ComposableRequest::Role::Session';
Adds a session object to the request. The "session_attr" list defines attributes (name, type, and default) which are dynamically added to the session class
Defines the following attributes;
session
Stores the user preferences. An instance of "session_class"
session_class
Defaults to Web::ComposableRequest::Session
Defines the following configuration attributes
expire_session
A code reference which will be called passing in the session object reference when the session has expired. By default it sets the authenticated boolean to false and returns the message displayed by the application
authenticated
max_messages
A non zero positive integer which defaults to 3. The maximum number of messages to keep in the queue
max_sess_time
A positive integer that defaults to 3600 seconds (one hour). The maximum amount of time a session can be idle before re-authentication is required. Setting this to zero disables the feature
session_attr
A hash reference of array references. Defaults to an empty hash. The keys are the session attribute names, the arrays are tuples containing a type and a default value
A non empty simple string which defaults to Web::ComposableRequest::Session. The name of the session base class
reset_session
Resets the session object so that next time it is referenced a new one is minted
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Web-ComposableRequest. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2017 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Web::ComposableRequest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::ComposableRequest
CPAN shell
perl -MCPAN -e shell install Web::ComposableRequest
For more information on module installation, please visit the detailed CPAN module installation guide.