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 | 3 | 3 | 29 | use strict; | |||
3 | 11 | ||||||
3 | 94 | ||||||
3 | 3 | 3 | 20 | use warnings; | |||
3 | 15 | ||||||
3 | 87 | ||||||
4 | 3 | 3 | 1488 | use Object::Method; | |||
3 | 1360 | ||||||
3 | 31 | ||||||
5 | |||||||
6 | sub new { | ||||||
7 | 3 | 3 | 0 | 22 | my ($class, $pcp_class, $on_violate_cb) = @_; | ||
8 | |||||||
9 | 3 | 70 | my $o = $pcp_class->new; | ||||
10 | |||||||
11 | method( | ||||||
12 | $o, | ||||||
13 | violation => sub { | ||||||
14 | 3 | 3 | 2133 | my ($self, $msg, $expl, $elem) = @_; | |||
15 | 3 | 43 | return [$msg, $expl, $elem]; | ||||
16 | } | ||||||
17 | 3 | 6124 | ); | ||||
18 | |||||||
19 | 3 | 283 | return $o; | ||||
20 | } | ||||||
21 | |||||||
22 | 1; |