Apache::Session

A persistence framework for session data
Download

Apache::Session Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alexandr Ciornii
  • Publisher web site:
  • http://search.cpan.org/~chorny/

Apache::Session Tags


Apache::Session Description

A persistence framework for session data Apache::Session is a persistence framework which is particularly useful for tracking session data between httpd requests. The module is designed to work with Apache and mod_perl, but it should work under CGI and other web servers, and it also works outside of a web server altogether.Apache::Session consists of five components: the interface, the object store, the lock manager, the ID generator, and the serializer. The interface is defined in Session.pm, which is meant to be easily subclassed. The object store can be the filesystem, a Berkeley DB, a MySQL DB, an Oracle DB, a Postgres DB, Sybase, or Informix. Locking is done by lock files, semaphores, or the locking capabilities of the various databases. Serialization is done via Storable, and optionally ASCII-fied via MIME or pack(). ID numbers are generated via MD5. The reader is encouraged to extend these capabilities to meet his own requirements.A derived class of Apache::Session is used to tie together the three following components. The derived class inherits the interface from Apache::Session, and specifies which store and locker classes to use. Apache::Session::MySQL, for instance, uses the MySQL storage class and also the MySQL locking class. You can easily plug in your own object store or locker class.SYNOPSIS use Apache::Session::MySQL; my %session; #make a fresh session for a first-time visitor tie %session, 'Apache::Session::MySQL'; #stick some stuff in it $session{visa_number} = "1234 5678 9876 5432"; #get the session id for later use my $id = $session{_session_id}; #...time passes... #get the session data back out again during some other request my %session; tie %session, 'Apache::Session::MySQL', $id; validate($session{visa_number}); #delete a session from the object store permanently tied(%session)->delete; Requirements: · Perl


Apache::Session Related Software