File Coverage

blib/lib/Ref/Store/Key.pm
Criterion Covered Total %
statement 29 30 96.6
branch 1 2 50.0
condition n/a
subroutine 13 13 100.0
pod 0 4 0.0
total 43 49 87.7


line stmt bran cond sub pod time code
1             package Ref::Store::Key;
2 1     1   6 use strict;
  1         2  
  1         22  
3 1     1   5 use warnings;
  1         2  
  1         21  
4 1     1   5 use Scalar::Util qw(weaken);
  1         2  
  1         32  
5 1     1   4 use Ref::Store::Common;
  1         2  
  1         174  
6              
7             #This is an attribute,
8              
9             sub weaken_encapsulated {
10 25 50   25 0 77 if(ref $_[0]->[HR_KFLD_REFSCALAR]) {
11 0         0 weaken $_[0]->[HR_KFLD_REFSCALAR];
12             }
13             }
14              
15             sub kstring {
16 44     44 0 130 $_[0]->[HR_KFLD_STRSCALAR];
17             }
18              
19       17 0   sub unlink_value {
20             #Pass, we don't need to do anything.
21             #The key object is destroyed and magic is invoked
22             #on the remaining scalar and forward entries
23             }
24              
25       25 0   sub link_value {
26             #Nothing here, either
27             }
28              
29             package Ref::Store::Key::Encapsulating;
30 1     1   6 use strict;
  1         1  
  1         14  
31 1     1   4 use warnings;
  1         1  
  1         27  
32 1     1   5 use Scalar::Util qw(weaken);
  1         2  
  1         33  
33 1     1   5 use Ref::Store::Common;
  1         1  
  1         101  
34 1     1   6 use base qw(Ref::Store::Key);
  1         2  
  1         66  
35              
36             1;