Stats.pm

filter: Statementstmt 48.3% 15 / 31 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 1 totaltotal 29.6% 19 / 64 CC 7 SCAR 23.8
CC
7
Cov
32%
__ANON__
20.0
AUTOLOAD
15.9
new
2.0
CRAP 10.8
« Client.pm ↑ Summary Pool.pm »
1 package Beanstalk::Stats;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 our $AUTOLOAD;
9 3 our $VERSION = "1.07";
10  
11 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my $proto = shift;
13 0 my $href = shift;
14 0 bless $href, $proto;
15 }
16  
17 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
18  
19 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=4 SCAR=27.7
20 0 (my $method = $AUTOLOAD) =~ s/.*:://;
21 0 (my $field = $method) =~ tr/_/-/;
22  
23 0 ▶ unless (ref($_[0]) and exists $_[0]->{$field}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $_[0] and exists $_[0]{$field}) 0 0 0
Condition0%0/3
ref $_[0] and exists $_[0]{$field}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $_[0] and exists $_[0]{$field}
ref $_[0] exists $_[0]{$field}
Truth table0%0/3
A and B
A= ref $_[0]B= exists $_[0]{$field}
ABresult
0X0
100
111
24 0 ▶ my $proto = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
25 0 Carp::croak(qq{Can't locate object method "$method" via package "$proto"});
26 }
27 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
28 0 ▶ *{$AUTOLOAD} = sub {
Subroutine __ANON__: not called CC=4 SCAR=30.0
29 0 my $self = shift;
30 0 ▶ unless (ref($self) and exists $self->{$field}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $self and exists $self->{$field}) 0 0 0
Condition0%0/3
ref $self and exists $self->{$field}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $self and exists $self->{$field}
ref $self exists $self->{$field}
Truth table0%0/3
A and B
A= ref $selfB= exists $self->{$field}
ABresult
0X0
100
111
31 0 ▶ my $proto = ref($self) || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
32 0 Carp::croak(qq{Can't locate object method "$method" via package "$proto"});
33 }
34 0 $self->{$field};
35 0 };
36  
37 0 goto &$AUTOLOAD;
38 }
39  
40 3 1;
41  
42 __END__
« Client.pm ↑ Summary Pool.pm »