File Coverage

blib/lib/Benchmark/Featureset/ParamCheck/Implementation/TypeParams2/Mouse.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   11448 use v5.12;
  4         14  
2 4     4   18 use strict;
  4         7  
  4         69  
3 4     4   16 use warnings;
  4         10  
  4         214  
4              
5              
6             our $AUTHORITY = 'cpan:TOBYINK';
7             our $VERSION = '0.007';
8              
9             use parent qw(Benchmark::Featureset::ParamCheck::Base);
10 4     4   19 use Type::Params 2.000000 qw(signature);
  4         7  
  4         19  
11 4     4   212 use Mouse::Util::TypeConstraints;
  4         48  
  4         22  
12 4     4   764 use namespace::autoclean;
  4         8  
  4         31  
13 4     4   374  
  4         7  
  4         27  
14             use constant long_name => 'Type::Params v2 API with Mouse';
15 4     4   211 use constant short_name => 'TP2-Mouse';
  4         8  
  4         200  
16 4     4   21  
  4         9  
  4         571  
17             my $t = \&Mouse::Util::TypeConstraints::find_or_parse_type_constraint;
18              
19             state $check = signature named => [
20             integer => $t->('Int'),
21 118     118 0 454 hashes => $t->('ArrayRef[HashRef]'),
22             object => duck_type(Printable3 => [qw/ print close /]),
23             ];
24             }
25              
26             state $check = signature pos => [
27             $t->('Int'),
28             $t->('ArrayRef[HashRef]'),
29 107     107 0 361 duck_type(Printable3 => [qw/ print close /]),
30             ];
31             }
32              
33             1;