John Drago > ASP4-1.087 > ASP4::SessionStateManager

Download:
ASP4-1.087.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

ASP4::SessionStateManager - Per-user state persistence

SYNOPSIS ^

  You've seen this page <%= $Session->{counter}++ %> times before.

DESCRIPTION ^

Web applications require session state management - and the simpler, the better.

ASP4::SessionStateManager is a simple blessed hash. When it goes out of scope, it is saved to the database (or whatever).

If no changes were made to the session, it is not saved.

PUBLIC PROPERTIES ^

is_read_only( 1:0 )

Starting with version 1.044, setting this property to a true value will prevent any changes made to the contents of the session during the current request from being saved at the end of the request.

NOTE: A side-effect is that calling $Session->save() after calling $Session->is_read_only(1) will *NOT* prevent changes from being saved ON PURPOSE. Explicitly calling $Session->save() will still cause the session data to be stored. Setting $Session->is_read_only(1) will only prevent the default behavior of saving session state at the end of each successful request.

PUBLIC METHODS ^

save( )

Causes the session data to be saved. (Unless $Session->is_read_only(1) is set.)

reset( )

Causes the session data to be emptied.

BUGS ^

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4 to submit bug reports.

HOMEPAGE ^

Please visit the ASP4 homepage at http://0x31337.org/code/ to see examples of ASP4 in action.

syntax highlighting: