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 | 9 | use strict; | |||
1 | 2 | ||||||
1 | 33 | ||||||
4 | 1 | 1 | 6 | use warnings; | |||
1 | 2 | ||||||
1 | 150 | ||||||
5 | |||||||
6 | require Exporter; | ||||||
7 | our @ISA = qw( Exporter ); | ||||||
8 | our @EXPORT_OK = qw( exceptional ); | ||||||
9 | |||||||
10 | sub import { | ||||||
11 | 4 | 4 | 11 | my $pkg = shift; | |||
12 | 4 | 10 | my $first_arg = shift; | ||||
13 | 4 | 100 | 66 | 118 | if ( $first_arg && $first_arg eq 'exceptional' ) { | ||
14 | 2 | 34 | die 'oof'; | ||||
15 | } | ||||||
16 | } | ||||||
17 | |||||||
18 | 0 | 0 | sub exceptional { } | ||||
19 | |||||||
20 | 1; |