line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
572
|
use 5.006; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
94
|
|
2
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
70
|
|
3
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
147
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package CHI::Config::Driver; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.001000'; # TRIAL |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Container for Driver configuration |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
467
|
use Moo qw( has ); |
|
3
|
|
|
|
|
10954
|
|
|
3
|
|
|
|
|
19
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'name' => ( is => 'ro', required => 1 ); |
16
|
|
|
|
|
|
|
has 'file' => ( is => 'ro', required => 1 ); |
17
|
|
|
|
|
|
|
has 'entry_no' => ( is => 'ro', required => 1 ); |
18
|
|
|
|
|
|
|
has 'config' => ( is => 'ro', required => 1 ); |
19
|
|
|
|
|
|
|
has 'memoize' => ( is => 'ro', lazy => 1, default => undef ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_cache { |
22
|
2
|
|
|
2
|
1
|
70
|
my ($self) = @_; |
23
|
2
|
50
|
|
|
|
8
|
return $self->{_cache} if exists $self->{_cache}; |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
669
|
require CHI; |
26
|
0
|
|
|
|
|
|
require Storable; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $instance = CHI->new( %{ Storable::dclone( $self->config ) } ); |
|
0
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
$self->{_cache} = $instance if $self->memoize; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $instance; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub source { |
36
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
37
|
0
|
|
|
|
|
|
return sprintf '%s ( entry #%s )', $self->file, $self->entry_no; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
3
|
|
1988
|
no Moo; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
12
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |