line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
17
|
|
|
17
|
|
799998
|
use warnings; |
|
17
|
|
|
|
|
65
|
|
|
17
|
|
|
|
|
456
|
|
4
|
17
|
|
|
17
|
|
86
|
|
|
17
|
|
|
|
|
37
|
|
|
17
|
|
|
|
|
415
|
|
5
|
|
|
|
|
|
|
use Moo; |
6
|
17
|
|
|
17
|
|
3327
|
use Carp; |
|
17
|
|
|
|
|
42334
|
|
|
17
|
|
|
|
|
99
|
|
7
|
17
|
|
|
17
|
|
11802
|
use Types::Standard qw(HashRef Bool); |
|
17
|
|
|
|
|
35
|
|
|
17
|
|
|
|
|
1035
|
|
8
|
17
|
|
|
17
|
|
3520
|
use Types::Common::String qw(NonEmptyStr); |
|
17
|
|
|
|
|
591556
|
|
|
17
|
|
|
|
|
225
|
|
9
|
17
|
|
|
17
|
|
22872
|
use namespace::clean; |
|
17
|
|
|
|
|
656558
|
|
|
17
|
|
|
|
|
194
|
|
10
|
17
|
|
|
17
|
|
15895
|
|
|
17
|
|
|
|
|
188739
|
|
|
17
|
|
|
|
|
111
|
|
11
|
|
|
|
|
|
|
has config => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => HashRef, |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has session => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => HashRef, |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has session_namespace => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => NonEmptyStr, |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has messages => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
isa => HashRef, |
32
|
|
|
|
|
|
|
required => 1, |
33
|
|
|
|
|
|
|
builder => sub { |
34
|
|
|
|
|
|
|
return $_[0]->config->{messages} // {}; |
35
|
17
|
|
100
|
17
|
|
1036
|
} |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has messages_validators => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
isa => HashRef, |
41
|
|
|
|
|
|
|
required => 1, |
42
|
|
|
|
|
|
|
builder => sub { |
43
|
|
|
|
|
|
|
return $_[0]->messages->{validators} // {}; |
44
|
17
|
|
100
|
17
|
|
696
|
} |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has ucfirst => ( |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
isa => Bool, |
50
|
|
|
|
|
|
|
lazy => 1, |
51
|
|
|
|
|
|
|
builder => sub { |
52
|
|
|
|
|
|
|
return $_[0]->messages->{ucfirst} // 1; |
53
|
12
|
|
50
|
12
|
|
615
|
} |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
has language => ( |
57
|
|
|
|
|
|
|
is => 'rw', |
58
|
|
|
|
|
|
|
isa => NonEmptyStr, |
59
|
|
|
|
|
|
|
lazy => 1, |
60
|
|
|
|
|
|
|
builder => sub { |
61
|
|
|
|
|
|
|
return $_[0]->messages->{language} // 'en'; |
62
|
11
|
|
100
|
11
|
|
504
|
} |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my ($self, %args) = @_; |
66
|
|
|
|
|
|
|
|
67
|
17
|
|
|
17
|
0
|
67031
|
if (my $config = $args{config}) { |
68
|
|
|
|
|
|
|
if (my $session = $config->{session}) { |
69
|
17
|
50
|
|
|
|
92
|
$args{session} = $session; |
70
|
17
|
50
|
|
|
|
72
|
$args{session_namespace} = $session->{namespace}; |
71
|
17
|
|
|
|
|
48
|
} |
72
|
17
|
|
|
|
|
62
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
return \%args; |
75
|
|
|
|
|
|
|
} |
76
|
17
|
|
|
|
|
266
|
|
77
|
|
|
|
|
|
|
1; |