File Coverage

blib/lib/Benchmark/Featureset/ParamCheck/Implementation/PV/TypeTiny.pm
Criterion Covered Total %
statement 34 34 100.0
branch n/a
condition n/a
subroutine 13 13 100.0
pod 0 2 0.0
total 47 49 95.9


line stmt bran cond sub pod time code
1 4     4   11371 use v5.12;
  4         13  
2 4     4   24 use strict;
  4         15  
  4         140  
3 4     4   23 use warnings;
  4         8  
  4         256  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.006';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base::PV);
10 4     4   31 use Ref::Util 0.203 ();
  4         8  
  4         21  
11 4     4   240 use Ref::Util::XS 0.116 ();
  4         56  
  4         80  
12 4     4   19 use Types::Standard 1.001_009 -types;
  4         50  
  4         100  
13 4     4   20 use Type::Tiny::XS 0.012 ();
  4         48  
  4         24  
14 4     4   16713 use namespace::autoclean;
  4         64  
  4         72  
15 4     4   20  
  4         18  
  4         24  
16             use constant long_name => 'Params::Validate with Type::Tiny';
17 4     4   238 use constant short_name => 'PV-TT';
  4         16  
  4         210  
18 4     4   21  
  4         8  
  4         658  
19             state $check = {
20             integer => { callbacks => { typecheck => (Int)->compiled_check } },
21 58     58 0 141 hashes => { callbacks => { typecheck => (ArrayRef[HashRef])->compiled_check } },
22             object => { callbacks => { typecheck => (HasMethods[qw/ print close /])->compiled_check } },
23             };
24             }
25              
26             state $check = [
27             { callbacks => { typecheck => (Int)->compiled_check } },
28             { callbacks => { typecheck => (ArrayRef[HashRef])->compiled_check } },
29 47     47 0 159 { callbacks => { typecheck => (HasMethods[qw/ print close /])->compiled_check } },
30             ];
31             }
32              
33             1;