Roles/Caching.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Photoset.pm ↑ Summary Types/Tools.pm »
1 package Flickr::Roles::Caching;
2  
3 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use CHI;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Types::Standard qw( Maybe Bool Str Int InstanceOf HashRef );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 our $VERSION = '1.22';
10  
11 3 has cache_duration => (
12 is => 'rw',
13 isa => Int,
14 required => 1,
15 default => 900,
16 );
17  
18 has '_cache' => (
19 is => 'ro',
20 isa => InstanceOf ['CHI::Driver'],
21 2 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
22 2 CHI->new(
23 driver => 'Memory',
24 global => 1
25 );
26 },
27 3 );
28  
29 3 has 'cache_key' => ( is => 'rwp', );
30  
31 3 has cache_hit => ( is => 'rwp', );
32  
33 3 ▶no Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 3 1;
36  
37 __END__
« Photoset.pm ↑ Summary Types/Tools.pm »