File Coverage

blib/lib/Benchmark/Featureset/ParamCheck/Implementation/DataValidator/Moose.pm
Criterion Covered Total %
statement 27 27 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 0 1 0.0
total 37 38 97.3


line stmt bran cond sub pod time code
1 4     4   1691 use v5.12;
  4         12  
2 4     4   18 use strict;
  4         10  
  4         70  
3 4     4   16 use warnings;
  4         15  
  4         224  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.006';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base::DataValidator);
10 4     4   39 use Moose 2.2002 ();
  4         9  
  4         19  
11 4     4   2046 use Moose::Util::TypeConstraints;
  4         1517193  
  4         190  
12 4     4   36 use namespace::autoclean;
  4         9  
  4         41  
13 4     4   9382  
  4         27786  
  4         15  
14             use constant long_name => 'Data::Validator with Moose';
15 4     4   223 use constant short_name => 'DV-Moose';
  4         9  
  4         187  
16 4     4   25  
  4         10  
  4         471  
17             my $t = \&Moose::Util::TypeConstraints::find_or_parse_type_constraint;
18              
19             state $check = Data::Validator->new(
20             integer => { isa => $t->('Int') },
21 59     59 0 245 hashes => { isa => $t->('ArrayRef[HashRef]') },
22             object => { isa => duck_type(Printable => [qw/ print close /]) },
23             );
24             }
25              
26             1;