Pad/Type/Int.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 CC 2 SCAR 2.9
CC
2
Cov
100%
checkFormat
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Pad/Type/File.pm ↑ Summary Pad/Type/Url.pm »
1 18 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 18 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 18 ▶use Getopt::Pad::Type::Number;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 class Getopt::Pad::Type::Int :isa(Getopt::Pad::Type::Number) :strict(params) {
7 18 ▶ use constant NAMES => ['i', 'int', 'integer'];
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 18 our $VERSION = '0.04';
10  
11 43 ▶ method checkFormat($value) {
Subroutine checkFormat: called CC=2 SCAR=6.9
Pod documented
12 43 ▶ return $value =~ /\A[+-]?[0-9]+\z/ ? undef : sprintf("'%s' is not an integer", $value);
Branch: 1 branch
BranchTrueFalseTotal
$value =~ /\A[+-]?[0-9]+\z/u ? : 32 11 43
13 18 }
14 }
15  
16 18 1;
17  
18 __END__
« Pad/Type/File.pm ↑ Summary Pad/Type/Url.pm »