blib/lib/MooseX/Types/CPF.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 77.4% 24 / 31 CC 1 SCAR 2.4
CC
1
Cov
83%
_validate_cpf
2.0
__ANON__
2.0
__ANON__
1.1
CRAP 1.3
↑ Summary
1 package MooseX::Types::CPF;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '0.02';
6 1 our $AUTHORITY = 'CPAN:TBR';
7  
8 1 ▶use MooseX::Types -declare => ['CPF'];
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use MooseX::Types::Moose qw(Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Business::BR::CPF;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub _validate_cpf {
Subroutine _validate_cpf: not called CC=1 SCAR=6.9
13 0 my ($str) = @_;
14 0 return test_cpf($str);
15 }
16  
17 subtype CPF,
18 as Str,
19 0 ▶ where { _validate_cpf($_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
20 0 ▶ message { 'CPF is invalid' };
Subroutine __ANON__: not called CC=1 SCAR=1.2
21  
22 1 1;
23  
24 __END__
↑ Summary