test-data/lib/Local/ImportException.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | 2 | 3 | 66.6 |
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 17 | 20 | 85.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Local::ImportException; | ||||||
2 | |||||||
3 | 1 | 1 | 7 | use strict; | |||
1 | 2 | ||||||
1 | 31 | ||||||
4 | 1 | 1 | 16 | use warnings; | |||
1 | 2 | ||||||
1 | 121 | ||||||
5 | |||||||
6 | require Exporter; | ||||||
7 | our @ISA = qw( Exporter ); | ||||||
8 | our @EXPORT_OK = qw( exceptional ); | ||||||
9 | |||||||
10 | sub import { | ||||||
11 | 4 | 4 | 13 | my $pkg = shift; | |||
12 | 4 | 6 | my $first_arg = shift; | ||||
13 | 4 | 100 | 66 | 123 | if ( $first_arg && $first_arg eq 'exceptional' ) { | ||
14 | 2 | 38 | die 'oof'; | ||||
15 | } | ||||||
16 | } | ||||||
17 | |||||||
18 | 0 | 0 | sub exceptional { } | ||||
19 | |||||||
20 | 1; |