CGI::Session

Persistent session data in CGI applications
Download

CGI::Session Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sherzod Ruzmetov
  • Publisher web site:
  • http://author.handalak.com/

CGI::Session Tags


CGI::Session Description

Persistent session data in CGI applications CGI::Session is a Perl module that offers persistent session data in CGI applications.SYNOPSIS # Object initialization: use CGI::Session; $session = new CGI::Session(); $CGISESSID = $session->id(); # Send proper HTTP header with cookies: print $session->header(); # Storing data in the session: $session->param('f_name', 'Sherzod'); # or $session->param(-name=>'l_name', -value=>'Ruzmetov'); # Flush the data from memory to the storage driver at least before your # program finishes since auto-flushing can be unreliable. # Warning: A bug in your logic whereby the DBI handle has gone # out of scope before flush() is called means flush() won't work # (when the session is a database session), so don't do that. $session->flush(); # Retrieving data: my $f_name = $session->param('f_name'); # or my $l_name = $session->param(-name=>'l_name'); # Clearing a certain session parameter: $session->clear(); # Expire '_is_logged_in' flag after 10 idle minutes: $session->expire('is_logged_in', '+10m') # Expire the session itself after 1 idle hour: $session->expire('+1h'); # Delete the session for good: $session->delete(); $session->flush(); # Recommended practice says use flush() after delete().CGI-Session is a Perl5 library that provides an easy, reliable and modular session management system across HTTP requests. Persistency is a key feature for such applications as shopping carts, login/authentication routines, and application that need to carry data across HTTP requests. CGI::Session does that and many more. Requirements: · Perl


CGI::Session Related Software