ParamCheck/Implementation/TypeParams/TypeNano.pm

filter: Statementstmt 100% 34 / 34 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 2 totaltotal 96.0% 48 / 50 CC 3 SCAR 3.6
CC
3
Cov
100%
__ANON__
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« ParamCheck/Base.pm ↑ Summary ParamCheck/Base/DataValidator.pm »
1 4 ▶use v5.12;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Benchmark::Featureset::ParamCheck::Implementation::TypeParams::TypeNano;
6  
7 4 our $AUTHORITY = 'cpan:TOBYINK';
8 4 our $VERSION = '0.006';
9  
10 4 ▶use parent qw(Benchmark::Featureset::ParamCheck::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use Type::Params 1.016004 qw(compile_named compile);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use Type::Nano qw( Int ArrayRef HashRef duck_type );
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 4 ▶use constant long_name => 'Type::Params with Type::Nano';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 ▶use constant short_name => 'TP-Nano';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 my $ArrayRef_of_HashRef = Type::Nano->new(
19 name => 'ArrayRef[HashRef]',
20 parent => ArrayRef,
21 2000015 ▶ constraint => sub { HashRef->check($_) || return !!0 for @$_; !!1 },
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
&HashRef()->check($_) or 3 4000086 4000089
22 4 );
23  
24 sub get_named_check {
25 158 ▶ state $check = compile_named(
Subroutine get_named_check: called CC=1 SCAR=0.0
Pod undocumented
26 integer => Int,
27 hashes => $ArrayRef_of_HashRef,
28 object => duck_type [qw/ print close /],
29 );
30 }
31  
32 sub get_positional_check {
33 67 ▶ state $check = compile(
Subroutine get_positional_check: called CC=1 SCAR=0.0
Pod undocumented
34 Int,
35 $ArrayRef_of_HashRef,
36 duck_type [qw/ print close /],
37 );
38 }
39  
40 4 1;
« ParamCheck/Base.pm ↑ Summary ParamCheck/Base/DataValidator.pm »