Numeric.pm

filter: Statementstmt 85.7% 18 / 21 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 72.7% 24 / 33 CC 4 SCAR 12.2
CC
4
Cov
75%
BEGIN
4.6
BEGIN
1.0
BEGIN
1.0
CRAP 3.4
« Numeric/PP.pm ↑ Summary
1 package String::Numeric;
2 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 ▶BEGIN {
Subroutine BEGIN: called CC=4 SCAR=15.2
6 6 our $VERSION = 0.9;
7 6 our @EXPORT_OK = qw(
8 is_numeric
9 is_float
10 is_decimal
11 is_integer
12 is_int
13 is_int8
14 is_int16
15 is_int32
16 is_int64
17 is_int128
18 is_uint
19 is_uint8
20 is_uint16
21 is_uint32
22 is_uint64
23 is_uint128
24 );
25  
26 our %EXPORT_TAGS = (
27 all => [ @EXPORT_OK ],
28 96 int => [ grep { /^is_int/ } @EXPORT_OK ],
29 6 uint => [ grep { /^is_uint/ } @EXPORT_OK ],
30 );
31  
32 6 ▶ if ( !$ENV{STRING_NUMERIC_PP} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ENV{"STRING_NUMERIC_PP"}) 0 6 6
33  
34 0 eval {
35 0 require String::Numeric::XS;
36 };
37 }
38  
39 6 ▶ if ( $ENV{STRING_NUMERIC_PP} || $@ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{'STRING_NUMERIC_PP'} or $@) { } 6 0 6
Condition33%1/3
$ENV{"STRING_NUMERIC_PP"} or $@
l!l&&r!l&&!r
600
MC/DC0%0/2
$ENV{"STRING_NUMERIC_PP"} or $@
$ENV{"STRING_NUMERIC_PP"} $@
Truth table33%1/3
A or B
A= $ENV{"STRING_NUMERIC_PP"}B= $@
ABresult
1X1
011
000
40 6 require String::Numeric::PP;
41 6 String::Numeric::PP->import(@EXPORT_OK);
42 }
43 else {
44 0 String::Numeric::XS->import(@EXPORT_OK);
45 }
46  
47 6 require Exporter;
48 6 *import = \&Exporter::import;
49 }
50  
51 6 1;
52  
53 __END__
« Numeric/PP.pm ↑ Summary