File Coverage

blib/lib/Prancer/Session/Store/Storable.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Prancer::Session::Store::Storable;
2              
3 1     1   605 use strict;
  1         1  
  1         31  
4 1     1   3 use warnings FATAL => 'all';
  1         2  
  1         24  
5              
6 1     1   3 use version;
  1         1  
  1         4  
7             our $VERSION = '1.04';
8              
9 1     1   530 use Plack::Session::Store::File;
  1         394  
  1         24  
10 1     1   4 use parent qw(Plack::Session::Store::File);
  1         1  
  1         4  
11              
12             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 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 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