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   1617 use v5.12;
  4         12  
2 4     4   17 use strict;
  4         13  
  4         66  
3 4     4   16 use warnings;
  4         11  
  4         208  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.007';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base::DataValidator);
10 4     4   32 use Moose 2.2002 ();
  4         9  
  4         22  
11 4     4   2013 use Moose::Util::TypeConstraints;
  4         1410830  
  4         138  
12 4     4   29 use namespace::autoclean;
  4         10  
  4         41  
13 4     4   8229  
  4         25446  
  4         16  
14             use constant long_name => 'Data::Validator with Moose';
15 4     4   201 use constant short_name => 'DV-Moose';
  4         22  
  4         172  
16 4     4   20  
  4         6  
  4         393  
17             my $t = \&Moose::Util::TypeConstraints::find_or_parse_type_constraint;
18              
19             state $check = Data::Validator->new(
20             integer => { isa => $t->('Int') },
21 120     120 0 371 hashes => { isa => $t->('ArrayRef[HashRef]') },
22             object => { isa => duck_type(Printable => [qw/ print close /]) },
23             );
24             }
25              
26             1;