NAME
PApp::Session - manage session-specific data.
SYNOPSIS
use PApp::Session;
# see also PApp::Prefs and PApp::Env
DESCRIPTION
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
- $session = new PApp::Session [$pathref]
-
Creates a new PApp::Session object for the given session id and application path. A reference to the path variable must be apssed in, so that changes in the path can be tracked by the module.
- $session->get($key)
-
Return the named session variable (or undef, when the variable does not exist).
- $session->set($key, $value)
-
Set the named session variable. If
$value
isundef
, then the variable will be deleted. You can pass in (serializable) references. - $ref = $session->ref($key)
-
Return a reference to the session value (i.e. a PApp::DataRef object). Updates to the referee will be seen by all processes.
SEE ALSO
PApp::Prefs, PApp::Env, PApp, PApp::User.
AUTHOR
Marc Lehmann <pcg@goof.com>
http://www.goof.com/pcg/marc/