DWH_File/ID_Mill.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond 60.0% 3 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 82.5% 33 / 40 CC 3 SCAR 5.7
CC
3
Cov
93%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« DWH_File/Tie.pm ↑ Summary DWH_File/Cached.pm »
1 package DWH_File::ID_Mill;
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  
7 9 @ISA = qw( );
8 9 $VERSION = 0.01;
9  
10 39 ▶sub new {
Subroutine new: called CC=3 SCAR=11.1
Pod undocumented
11 39 my ( $this, $kernel, $property ) = @_;
12 39 ▶ my $class = ref $this || $this;
Condition33%1/3
ref $this || $this
l!l&&r!l&&!r
0390
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table33%1/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
13 39 my $current = $kernel->fetch_property( $property );
14 39 ▶ $current ||= 0;
Condition100%2/2
$current ||= 0
l!l
2019
MC/DC100%1/1
$current ||= 0
$current
Truth table100%2/2
A
A= $current
Aresult
11
00
15 39 my $self = { current => $current,
16 kernel => $kernel,
17 property => $property,
18 };
19 39 bless $self, $class;
20 39 return $self;
21 }
22  
23 58 ▶sub next {
Subroutine next: called CC=1 SCAR=0.0
Pod undocumented
24 58 $_[ 0 ]->{ current }++;
25 58 return $_[ 0 ]->{ current };
26 }
27  
28 39 ▶sub save {
Subroutine save: called CC=1 SCAR=0.0
Pod undocumented
29 39 my ( $self ) = @_;
30 $self->{ kernel }->store_property( $self->{ property },
31 39 $self->{ current } );
32 }
33  
34 9 1;
35  
36 __END__
« DWH_File/Tie.pm ↑ Summary DWH_File/Cached.pm »