Brent Royal-Gordon > WWW-Kontent > WWW::Kontent::Session

Download:
WWW-Kontent-0.02.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

WWW::Kontent::Session - Kontent session manager

SYNOPSIS ^

        $request.session.get("identity");
        $request.session.set("identity", 'users/anonymous');

DESCRIPTION ^

WWW::Kontent::Session is an object representing a Kontent session. Sessions are kept in a pool off the root page, and have zero or more keys, each with an accompanying value.

Attributes

sid

Returns the session ID associated with this session. Supervisors should arrange to have session IDs sent along with every outgoing request as a cookie.

Constructors

new(:root($root), :sid($sid))

Creates a new Session object with the associated session ID. If no session ID is provided, it will generate one by hashing together various pieces of data in the environment and a few random numbers.

Methods

get($key)

Retrieves the value of the given key from the session.

set($key, $value)

Sets the given key to the given value.

delete()

Deletes the entire session. The behavior of the Session object after this method is called is undefined.

SEE ALSO ^

WWW::Kontent, WWW::Kontent::Store

syntax highlighting: