Pithub/Result/SharedCache.pm

filter: Statementstmt 80.0% 12 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 2 / 2 totaltotal 80.9% 17 / 21 CC 1 SCAR 2.2
CC
1
Cov
80%
set_shared_cache
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Pithub/Repos/Watching.pm ↑ Summary Pithub/ResultSet.pm »
1 package Pithub::Result::SharedCache;
2 24 our $AUTHORITY = 'cpan:PLU';
3  
4 24 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 24 our $VERSION = '0.01041';
7  
8 # ABSTRACT: A role to share the LRU cache with all Pithub objects
9  
10 24 ▶use CHI ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 24 my $store = {};
13  
14 24 my $Shared_Cache = CHI->new(
15 datastore => $store,
16 driver => 'RawMemory',
17 max_size => 200,
18 size => 200,
19 );
20  
21  
22 sub shared_cache {
23 1136 ▶ return $Shared_Cache;
Subroutine shared_cache: called CC=1 SCAR=0.0
Pod documented
24 }
25  
26  
27 sub set_shared_cache {
28 0 ▶ my ( $self, $cache ) = @_;
Subroutine set_shared_cache: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 $Shared_Cache = $cache;
31  
32 0 return;
33 }
34  
35 24 1;
36  
37 __END__
« Pithub/Repos/Watching.pm ↑ Summary Pithub/ResultSet.pm »