File Coverage

blib/lib/Benchmark/Featureset/ParamCheck/Implementation/TypeParams/Moose.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod 0 2 0.0
total 39 41 95.1


line stmt bran cond sub pod time code
1 4     4   11933 use v5.12;
  4         16  
2 4     4   28 use strict;
  4         9  
  4         81  
3 4     4   21 use warnings;
  4         8  
  4         273  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.006';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base);
10 4     4   35 use Type::Params 1.016004 qw(compile_named compile);
  4         9  
  4         27  
11 4     4   2428 use Moose::Util::TypeConstraints 2.2002;
  4         18372  
  4         33  
12 4     4   1319 use namespace::autoclean;
  4         80  
  4         60  
13 4     4   7501  
  4         22  
  4         30  
14             use constant long_name => 'Type::Params with Moose';
15 4     4   237 use constant short_name => 'TP-Moose';
  4         20  
  4         245  
16 4     4   26  
  4         10  
  4         587  
17             my $t = \&Moose::Util::TypeConstraints::find_or_parse_type_constraint;
18              
19             state $check = compile_named(
20             integer => $t->('Int'),
21 58     58 0 218 hashes => $t->('ArrayRef[HashRef]'),
22             object => duck_type(Printable => [qw/ print close /]),
23             );
24             }
25              
26             state $check = compile(
27             $t->('Int'),
28             $t->('ArrayRef[HashRef]'),
29 47     47 0 223 duck_type(Printable => [qw/ print close /]),
30             );
31             }
32              
33             1;