File Coverage

blib/lib/Benchmark/Featureset/ParamCheck/Implementation/MXPV/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   12112 use v5.12;
  4         13  
2 4     4   21 use strict;
  4         7  
  4         87  
3 4     4   19 use warnings;
  4         6  
  4         229  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.007';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base::MXPV);
10 4     4   20 use Moose 2.2002 ();
  4         7  
  4         28  
11 4     4   216 use Moose::Util::TypeConstraints;
  4         61  
  4         76  
12 4     4   19 use namespace::autoclean;
  4         9  
  4         19  
13 4     4   5731  
  4         8  
  4         14  
14             use constant long_name => 'MooseX::Params::Validate with Moose';
15 4     4   186 use constant short_name => 'MXPV-Moose';
  4         8  
  4         261  
16 4     4   23  
  4         7  
  4         591  
17             my $t = \&Moose::Util::TypeConstraints::find_or_parse_type_constraint;
18              
19             state $check = {
20             integer => { isa => $t->('Int') },
21 118     118 0 473 hashes => { isa => $t->('ArrayRef[HashRef]') },
22             object => { isa => duck_type(Printable => [qw/ print close /]) },
23             };
24             }
25              
26             state $check = [
27             { isa => $t->('Int') },
28             { isa => $t->('ArrayRef[HashRef]') },
29 107     107 0 291 { isa => duck_type(Printable => [qw/ print close /]) },
30             ];
31             }
32              
33             1;