Marc Lehmann > PApp > PApp::Session

Download:
PApp-2.0.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 2   Source  

NAME ^

PApp::Session - manage session-specific data.

SYNOPSIS ^

 use PApp::Session;
 # see also PApp::Prefs and PApp::Env

DESCRIPTION ^

This module manages session-specific variables, that is, values that get associated with all accesses within a single session. Session variables keep their value when old states get re-requested, as opposed to state variables that change back to their old value, and can be used for transactions or other data that belongs to a whole session and not a single access.

Functions

locksession { BLOCK }

Execute the given block while the session table is locked against changes from other processes. Needless to say, the block should execute as fast as possible. Returns the return value of BLOCK (which is called in scalar context).

Methods

PApp::Session::get ($key)

Return the named session variable (or undef, when the variable does not exist).

PApp::Session::set ($key, $value)

Set the named session variable. If $value is undef, then the variable will be deleted. You can pass in (serializable) references.

PApp::Session::ref ($key)

Return a reference to the session value (i.e. a PApp::DataRef object). Updates to the referend will be seen by all processes.

SEE ALSO ^

PApp::Prefs, PApp::Env, PApp, PApp::User.

AUTHOR ^

 Marc Lehmann <schmorp@schmorp.de>
 http://home.schmorp.de/
syntax highlighting: