| 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
Condition0%0/3
ref $_[0] and exists $_[0]{$field}
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}
| |||||||||||||||||||||||||||||
| 24 | 0 | ▶ | my $proto = ref($_[0]) || $_[0]; | ||||||||||||||||||||||||||
|
Condition0%0/3
ref $_[0] || $_[0]
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0]
$_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
| |||||||||||||||||||||||||||||
| 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
Condition0%0/3
ref $self and exists $self->{$field}
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}
| |||||||||||||||||||||||||||||
| 31 | 0 | ▶ | my $proto = ref($self) || $self; | ||||||||||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||