DWH_File/Tie/Foreign.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran n/a Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 90.9% 10 / 11 Podpod 0.0% 0 / 5 totaltotal 75.0% 42 / 56 CC 3 SCAR 3.4
CC
3
Cov
89%
new
2.1
to_string
2.1
cut_refcount
2.0
CRAP 1.4
« DWH_File/Subscript.pm ↑ Summary DWH_File/Registry/Class.pm »
1 package DWH_File::Tie::Foreign;
2  
3 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use vars qw( @ISA $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 use overload
7 9 ▶ '""' => \&to_string,
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 fallback => 1;
9  
10 9 ▶use DWH_File::Value;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 9 ▶use DWH_File::Reference;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 9 @ISA = qw( DWH_File::Value DWH_File::Reference );
14 9 $VERSION = 0.01;
15  
16 21 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
17 21 my ( $this, $client, $value ) = @_;
18 21 ▶ my $class = ref( $this ) || $this;
Condition33%1/3
ref $this || $this
l!l&&r!l&&!r
0210
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table33%1/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
19 21 my $self = { client => $client,
20 value => $value,
21 string_val => '',
22 };
23 21 bless $self, $class;
24 21 return $self;
25 }
26  
27 42 ▶sub to_string {
Subroutine to_string: called CC=2 SCAR=7.2
Pod undocumented
28 $_[ 0 ]->{ string_val } ||= $_[ 0 ]->{ client }->
29 42 ▶ reference_string( $_[ 0 ]->{ value } );
Condition66%2/3
$_[0]{"string_val"} ||= $_[0]{"client"}->reference_string($_[0]{"value"})
l!l&&r!l&&!r
21210
MC/DC0%0/2
$_[0]{"string_val"} ||= $_[0]{"client"}->reference_string($_[0]{"value"})
$_[0]{"string_val"} $_[0]{"client"}->reference_string($_[0]{"value"})
Truth table66%2/3
A ||= B
A= $_[0]{"string_val"}B= $_[0]{"client"}->reference_string($_[0]{"value"})
ABresult
1X1
011
000
30 }
31  
32 19 ▶sub actual_value { $_[ 0 ]->{ value }->actual_value }
Subroutine actual_value: called CC=1 SCAR=0.0
Pod undocumented
33  
34 2 ▶sub bump_refcount { $_[ 0 ]->{ value }->bump_refcount }
Subroutine bump_refcount: called CC=1 SCAR=0.0
Pod undocumented
35  
36 0 ▶sub cut_refcount { $_[ 0 ]->{ value }->cut_refcount }
Subroutine cut_refcount: not called CC=1 SCAR=6.9
Pod undocumented
37  
38 9 1;
39  
40 __END__
« DWH_File/Subscript.pm ↑ Summary DWH_File/Registry/Class.pm »