CGI::Session::Hidden - persistent session using hidden fields
In the CGI script:
use CGI::Session; my $session = new CGI::Session("driver:Hidden", undef, {CGI=>$cgi_obj});
In the HTML (pseudo-code):
<input type="hidden" name="$CGI::Session::NAME" value="$session->id()" />
or
<input $session->field() />
This driver module for CGI::Session 3.x allows storing the session inside a hidden field in the HTML page.
The semantics are somewhat different than standard driver modules, but good enough for most uses.
$attributes = $session->field;
Produces type, name and value attributes to be used inside and HTML <input> tag.
type
name
value
<input>
It is not (and can not be) a drop-in replacement for other drivers.
Mattia Barbon <mbarbon@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The latest sources can be found on GitHub at http://github.com/mbarbon/cgi-session-hidden/tree
CGI::Session
To install CGI::Session::Hidden, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session::Hidden
CPAN shell
perl -MCPAN -e shell install CGI::Session::Hidden
For more information on module installation, please visit the detailed CPAN module installation guide.