Boris Zentner > Apache-PageKit-1.09_01 > Apache::PageKit::Session

Download:
Apache-PageKit-1.09_01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.50   Source   Latest Release: Apache-PageKit-1.18

NAME ^

Apache::PageKit::Session - Session Handling

DESCRIPTION ^

An adaptation of Apache::Session to work with Apache::PageKit

SYNOPSIS ^

Addtional Attributes for TIE

lazy

By Specifing this attribute, you tell Apache::Session to not do any access to the object store, until the first read or write access to the tied hash. Otherwise the tie function will make sure the hash exist or creates a new one.

create_unknown

Setting this to one causes Apache::Session to create a new session when the specified session id does not exists. Otherwise it will die.

Store

Specify the class for the object store. (The Apache::Session::Store prefix is optional) Only for Apache::Session 1.5x.

Lock

Specify the class for the lock manager. (The Apache::Session::Lock prefix is optional) Only for Apache::Session 1.5x.

Generate

Specify the class for the id generator. (The Apache::Session::Generate prefix is optional) Only for Apache::Session 1.5x.

Defaults to MD5.

Serialize

Specify the class for the data serializer. (The Apache::Session::Serialize prefix is optional) Only for Apache::Session 1.5x.

Defaults to Storable.

Example using attributes to specfiy store and object classes instead of a derived class:

 use Apache::PageKit::Session;

 tie %session, 'Apache::PageKit::Session', undef,
    { 
    Store => 'MySQL',
    Lock => 'MySQL',
    Handle => $dbh, 
    LockHandle => $dbh
    };

NOTE: Apache::PageKit::Session will require the necessary perl modules for you.

Addtional Methods

setid

Set the session id for futher accesses.

getid

Get the session id. The difference to using $session{_session_id} is, that in lazy mode, getid will not create a new session id, if it doesn't exists.

cleanup

Writes any pending data, releases all locks and deletes all data from memory.

AUTHORS ^

This module was adapted from HTML::Embperl::Session by T.J. Mather <tjmather@anidea.com>.

Gerald Richter <richter@dev.ecos.de> is the current maintainer of HTML::Embperl::Session.

This class was written by Jeffrey Baker (jeffrey@kathyandjeffrey.net) but it is taken wholesale from a patch that Gerald Richter (richter@ecos.de) sent me against Apache::Session.

syntax highlighting: