| 1 | package Prancer::Session::Store::Storable; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings FATAL => 'all'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use version; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | our $VERSION = '1.05'; | |
| 8 | |||
| 9 | 1 | ▶ | use Plack::Session::Store::File; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use parent qw(Plack::Session::Store::File); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | 1; | |
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Prancer::Session::Store::Storable | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 20 | This package implements a session handler based on files written using the | ||
| 21 | L<Storable> package. Session files are saved in the configured directory. | ||
| 22 | This backend can be used in production environments but two things should be | ||
| 23 | kept in mind: the content of the session files is in plain text and session | ||
| 24 | files still need to be periodically purged. | ||
| 25 | |||
| 26 | To use this session storage handler, add this to your configuration file: | ||
| 27 | |||
| 28 | session: | ||
| 29 | store: | ||
| 30 | driver: Prancer::Session::Store::Storable | ||
| 31 | options: | ||
| 32 | dir: /tmp/prancer/sessions | ||
| 33 | |||
| 34 | =head1 OPTIONS | ||
| 35 | |||
| 36 | =over 4 | ||
| 37 | |||
| 38 | =item dir | ||
| 39 | |||
| 40 | B<REQUIRED> This indicates the path where sessions will be written. This path | ||
| 41 | must be writable by the same user that is running the application server. If | ||
| 42 | this is not set or the configured path is not writable then the session handler | ||
| 43 | will not be initialized and sessions will not work. | ||
| 44 | |||
| 45 | =back | ||
| 46 | |||
| 47 | =cut | ||