TPath/Numifiable.pm

filter: Statementstmt 75.0% 9 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod n/a totaltotal 62.5% 10 / 16 CC 2 SCAR 14.7
CC
2
Cov
64%
__ANON__
6.0
BEGIN
1.0
CRAP 4.3
« TPath/Test/Node/Complement.pm ↑ Summary TPath/Test/Node/Attribute.pm »
1 package TPath::Numifiable;
2 2 $TPath::Numifiable::VERSION = '1.007';
3 # ABSTRACT: role of things that evaluate to numbers
4  
5 2 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 2 with 'TPath::Stringifiable';
9  
10  
11 2 has negated => ( is => 'ro', isa => 'Bool', default => 0 );
12  
13  
14 2 requires 'to_num';
15  
16 0 ▶around to_num => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
17 0 my ( $orig, $self, $ctx ) = @_;
18 0 my $v = $self->$orig($ctx);
19 0 ▶ return $self->negated ? -$v : $v;
Branch: 1 branch
BranchTrueFalseTotal
$self->negated ? : 0 0 0
20 2 };
21  
22 2 1;
23  
24 __END__
« TPath/Test/Node/Complement.pm ↑ Summary TPath/Test/Node/Attribute.pm »