Rx/CoreType/int.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.1% 25 / 26 CC 2 SCAR 2.5
CC
2
Cov
100%
_value_is_of_type
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Rx/TypeBundle/Core.pm ↑ Summary Rx/CommonType/EasyNew.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Data::Rx::CoreType::int;
4 # ABSTRACT: the Rx //int type
5 1 $Data::Rx::CoreType::int::VERSION = '0.200007';
6 1 ▶use parent 'Data::Rx::CoreType::num';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 54 ▶sub subname { 'int' }
Subroutine subname: called CC=1 SCAR=0.0
Pod undocumented
9  
10 sub __type_fail {
11 188 ▶ my ($self, $value) = @_;
Subroutine __type_fail: called CC=1 SCAR=0.0
12 188 $self->fail({
13 error => [ qw(type) ],
14 message => "value is not an integer",
15 value => $value,
16 });
17 }
18  
19 sub _value_is_of_type {
20 217 ▶ my ($self, $value) = @_;
Subroutine _value_is_of_type: called CC=2 SCAR=6.9
21  
22 217 ▶ return unless $self->SUPER::_value_is_of_type($value);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->SUPER::_value_is_of_type($value) 53 164 217
23 164 return ($value == int $value);
24 }
25  
26 1 1;
27  
28 __END__
« Rx/TypeBundle/Core.pm ↑ Summary Rx/CommonType/EasyNew.pm »