File Coverage

blib/lib/App/PerlNitpick/PCPWrap.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package App::PerlNitpick::PCPWrap;
2 1     1   7 use strict;
  1         2  
  1         27  
3 1     1   5 use warnings;
  1         2  
  1         23  
4 1     1   451 use Object::Method;
  1         359  
  1         6  
5              
6             sub new {
7 1     1 0 4 my ($class, $pcp_class, $on_violate_cb) = @_;
8              
9 1         18 my $o = $pcp_class->new;
10              
11             method(
12             $o,
13             violation => sub {
14 1     1   1341 my ($self, $msg, $expl, $elem) = @_;
15 1         14 return [$msg, $expl, $elem];
16             }
17 1         1524 );
18              
19 1         79 return $o;
20             }
21              
22             1;