blib/lib/Sub/Meta/Finder/SubWrapInType.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 12 | 91.6 |
branch | 1 | 2 | 50.0 |
condition | 1 | 3 | 33.3 |
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 18 | 22 | 81.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Sub::Meta::Finder::SubWrapInType; | ||||||
2 | 2 | 2 | 925 | use strict; | |||
2 | 4 | ||||||
2 | 48 | ||||||
3 | 2 | 2 | 8 | use warnings; | |||
2 | 4 | ||||||
2 | 41 | ||||||
4 | |||||||
5 | 2 | 2 | 9 | use Scalar::Util (); | |||
2 | 4 | ||||||
2 | 177 | ||||||
6 | |||||||
7 | sub find_materials { | ||||||
8 | 4 | 4 | 1 | 8 | my $sub = shift; | ||
9 | |||||||
10 | 4 | 50 | 33 | 19 | return unless Scalar::Util::blessed($sub) && $sub->isa('Sub::WrapInType'); | ||
11 | |||||||
12 | return { | ||||||
13 | 0 | sub => $sub, | |||||
14 | args => $sub->params, | ||||||
15 | returns => $sub->returns, | ||||||
16 | is_method => $sub->is_method, | ||||||
17 | } | ||||||
18 | } | ||||||
19 | |||||||
20 | 1; | ||||||
21 | __END__ |