PApp::Session - manage session-specific data.


PApp documentation  | view source Contained in the PApp distribution.

Index


NAME

Top

PApp::Session - manage session-specific data.

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

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

AUTHOR

Top

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


PApp documentation  | view source Contained in the PApp distribution.