line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Curio::Role::CHI; |
2
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
514639
|
use CHI; |
|
2
|
|
|
|
|
70195
|
|
|
2
|
|
|
|
|
69
|
|
5
|
2
|
|
|
2
|
|
17
|
use Types::Standard qw( InstanceOf ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
33
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1221
|
use Moo::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
8
|
2
|
|
|
2
|
|
742
|
use strictures 2; |
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
74
|
|
9
|
2
|
|
|
2
|
|
435
|
use namespace::clean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
20
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Curio::Role'; |
12
|
|
|
|
|
|
|
with 'MooX::BuildArgs'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
after initialize => sub{ |
15
|
|
|
|
|
|
|
my ($class) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $factory = $class->factory(); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$factory->does_caching( 1 ); |
20
|
|
|
|
|
|
|
$factory->cache_per_process( 1 ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return; |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has chi => ( |
26
|
|
|
|
|
|
|
is => 'lazy', |
27
|
|
|
|
|
|
|
isa => InstanceOf[ 'CHI::Driver' ], |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _build_chi { |
31
|
3
|
|
|
3
|
|
16479
|
my ($self) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $chi = CHI->new( |
34
|
3
|
|
|
|
|
8
|
%{ $self->build_args() }, |
|
3
|
|
|
|
|
25
|
|
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
3
|
|
|
|
|
185974
|
$self->clear_build_args(); |
38
|
|
|
|
|
|
|
|
39
|
3
|
|
|
|
|
62
|
return $chi; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |