DWH_File/Subscript.pm

filter: Statementstmt 100% 28 / 28 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 4 totaltotal 80.8% 38 / 47 CC 3 SCAR 3.5
CC
3
Cov
91%
new
2.1
from_input
2.0
BEGIN
1.0
CRAP 1.4
« DWH_File/Subscript/Wired.pm ↑ Summary DWH_File/Tie/Foreign.pm »
1 package DWH_File::Subscript;
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 @ISA = qw( );
11 9 $VERSION = 0.01;
12  
13 329 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
14 329 my ( $this, $string ) = @_;
15 329 ▶ my $class = ref $this || $this;
Condition33%1/3
ref $this || $this
l!l&&r!l&&!r
03290
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table33%1/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
16 329 my $self = \$string;
17 329 bless $self, $class;
18 329 return $self;
19 }
20  
21 329 ▶sub from_input {
Subroutine from_input: called CC=2 SCAR=7.1
Pod undocumented
22 329 my ( $this, $owner, $actual ) = @_;
23 329 ▶ defined $actual or $actual = '';
Branch: 1 branch
BranchTrueFalseTotal
defined $actual or $actual = "" 329 0 329
24 329 return $this->new( pack( 'L', $owner->{ id } ) . $actual );
25 }
26  
27 463 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod undocumented
28 463 return ${ $_[ 0 ] };
29 }
30  
31 80 ▶sub actual {
Subroutine actual: called CC=1 SCAR=0.0
Pod undocumented
32 80 my ( $ignore, $actual ) = unpack "La*", ${ $_[ 0 ] };
33 80 return $actual;
34 }
35  
36 9 1;
37  
38 __END__
« DWH_File/Subscript/Wired.pm ↑ Summary DWH_File/Tie/Foreign.pm »