| 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
| |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 0 | eval { | |||||||||||||||||||||||||||
| 35 | 0 | require String::Numeric::XS; | |||||||||||||||||||||||||||
| 36 | }; | ||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 6 | ▶ | if ( $ENV{STRING_NUMERIC_PP} || $@ ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ENV{"STRING_NUMERIC_PP"} or $@
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= $@
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||