line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Session::Store; |
2
|
13
|
|
|
13
|
|
5018
|
use strict; |
|
13
|
|
|
|
|
47
|
|
|
13
|
|
|
|
|
320
|
|
3
|
13
|
|
|
13
|
|
56
|
use warnings; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
553
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.33'; |
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
64
|
use Plack::Util::Accessor qw[ _stash ]; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
67
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
7
|
|
|
7
|
1
|
356
|
my ($class, %params) = @_; |
12
|
7
|
|
50
|
|
|
54
|
$params{'_stash'} ||= +{}; |
13
|
7
|
|
|
|
|
62
|
bless { %params } => $class; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub fetch { |
17
|
26
|
|
|
26
|
1
|
113
|
my ($self, $session_id) = @_; |
18
|
26
|
|
|
|
|
55
|
$self->_stash->{ $session_id }; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub store { |
22
|
38
|
|
|
38
|
1
|
234
|
my ($self, $session_id, $session) = @_; |
23
|
38
|
|
|
|
|
82
|
$self->_stash->{ $session_id } = $session; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub remove { |
27
|
4
|
|
|
4
|
1
|
40
|
my ($self, $session_id) = @_; |
28
|
4
|
|
|
|
|
26
|
delete $self->_stash->{ $session_id } |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |