blib/lib/App/NDTools/INC.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 16 | 17 | 94.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package App::NDTools::INC; | ||||||
2 | |||||||
3 | 19 | 19 | 121 | use strict; | |||
19 | 60 | ||||||
19 | 565 | ||||||
4 | 19 | 19 | 103 | use warnings; | |||
19 | 32 | ||||||
19 | 1904 | ||||||
5 | |||||||
6 | my $added = 0; | ||||||
7 | |||||||
8 | sub import { | ||||||
9 | 51 | 100 | 51 | 794 | return if ($added); # prevent duplicates when invoked more than once | ||
10 | |||||||
11 | 19 | 52 | my $dir = substr(__FILE__, 0, -3); | ||||
12 | 19 | 50 | 297 | unshift @INC, $dir if (-d $dir); | |||
13 | |||||||
14 | 19 | 502 | $added = 1; | ||||
15 | } | ||||||
16 | |||||||
17 | 1; |