PSGI::Hector::Session - Session class
my $s = $hector->getSession(); $s->setVar('name', 'value'); my $var = $s->getVar('name');
Class to deal with session management.
my $session = PSGI::Hector::Session->new($hector)
Reads or creates a new session for the visitor.
The correct Set-Cookie header will be issued through the provided PSGI::Hector::Response object.
$s->setVar('name', 'value');
Takes two arguments, first the name of the variable then the value of the variable to store.
$s->setSecretVar('name', 'value');
The value is encrypted before being stored.
my $value = $s->getVar('name')
Retrieves the value which corresponds to the given variable name.
my $value = $s->getSecretVar('name')
The value is decrypted before being returned.
Remove the current session from memory, disk and expire it in the browser.
MacGyveR <dumb@cpan.org>
Development questions, bug reports, and patches are welcome to the above address
Copyright (c) 2020 MacGyveR. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install PSGI::Hector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PSGI::Hector
CPAN shell
perl -MCPAN -e shell install PSGI::Hector
For more information on module installation, please visit the detailed CPAN module installation guide.