line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ark::Plugin::Session::Store::Memory; |
2
|
10
|
|
|
10
|
|
3921
|
use strict; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
241
|
|
3
|
10
|
|
|
10
|
|
45
|
use warnings; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
214
|
|
4
|
10
|
|
|
10
|
|
41
|
use Ark::Plugin 'Session'; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my %session; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
around 'get_session_data' => sub { |
9
|
|
|
|
|
|
|
my $next = shift; |
10
|
|
|
|
|
|
|
my ($self, $key) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
if (my $session = $session{$key}) { |
13
|
|
|
|
|
|
|
return $session; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$next->(@_); |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
around 'set_session_data' => sub { |
20
|
|
|
|
|
|
|
my $next = shift; |
21
|
|
|
|
|
|
|
my ($self, $key, $value) = @_; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
$session{$key} = $value; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$next->(@_); |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
around 'remove_session_data' => sub { |
29
|
|
|
|
|
|
|
my $next = shift; |
30
|
|
|
|
|
|
|
my ($self, $key) = @_; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
delete $session{$key}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$next->(@_); |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |