File Coverage

blib/lib/Attribute/Contract/Modifier/Requires.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Attribute::Contract::Modifier::Requires;
2              
3 4     4   19 use strict;
  4         11  
  4         140  
4 4     4   22 use warnings;
  4         7  
  4         133  
5              
6             require Carp;
7 4     4   2039 use Attribute::Contract::Utils;
  4         8  
  4         494  
8              
9             sub modify {
10 5     5 0 8 my $class = shift;
11 5         10 my ($package, $name, $code_ref, $import, $attributes) = @_;
12              
13 5         19 my $check = build_check(@_);
14              
15             sub {
16 6     6   31113 $code_ref->($check->(@_));
17 5         139 };
18             }
19              
20             1;