DWH_File/Subscript/Wired.pm

filter: Statementstmt 96.7% 30 / 31 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 90.0% 9 / 10 Podpod 0.0% 0 / 4 totaltotal 78.8% 41 / 52 CC 3 SCAR 3.6
CC
3
Cov
89%
new
2.1
from_input
2.0
actual
2.0
CRAP 1.4
« DWH_File/Cache.pm ↑ Summary DWH_File/Subscript.pm »
1 package DWH_File::Subscript::Wired;
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::Subscript;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 9 ▶use DWH_File::Slot;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 9 @ISA = qw( DWH_File::Subscript DWH_File::Slot );
14 9 $VERSION = 0.01;
15  
16 566 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
17 566 my ( $this, $owner, $value ) = @_;
18 566 ▶ my $class = ref $this || $this;
Condition33%1/3
ref $this || $this
l!l&&r!l&&!r
05660
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 566 my $self = { owner => $owner,
20 value => $value,
21 };
22 566 bless $self, $class;
23 566 return $self;
24 }
25  
26 558 ▶sub from_input {
Subroutine from_input: called CC=2 SCAR=7.1
Pod undocumented
27 558 my ( $this, $owner, $actual ) = @_;
28 558 ▶ defined $actual or $actual = '';
Branch: 1 branch
BranchTrueFalseTotal
defined $actual or $actual = "" 558 0 558
29 return $this->new( $owner, DWH_File::Value::Factory->
30 558 from_input( $owner->{ kernel }, $actual ) );
31 }
32  
33 663 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod undocumented
34 663 return pack( "L", $_[ 0 ]->{ owner }{ id } ) . $_[ 0 ]->{ value };
35 }
36  
37 0 ▶sub actual {
Subroutine actual: not called CC=1 SCAR=6.9
Pod undocumented
38 0 return $_[ 0 ]->{ value }->actual_value;
39 }
40  
41 9 1;
42  
43 __END__
« DWH_File/Cache.pm ↑ Summary DWH_File/Subscript.pm »