| 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 | 123 | use strict; | |||
| 19 | 56 | ||||||
| 19 | 573 | ||||||
| 4 | 19 | 19 | 98 | use warnings; | |||
| 19 | 42 | ||||||
| 19 | 1980 | ||||||
| 5 | |||||||
| 6 | my $added = 0; | ||||||
| 7 | |||||||
| 8 | sub import { | ||||||
| 9 | 51 | 100 | 51 | 825 | return if ($added); # prevent duplicates when invoked more than once | ||
| 10 | |||||||
| 11 | 19 | 61 | my $dir = substr(__FILE__, 0, -3); | ||||
| 12 | 19 | 50 | 307 | unshift @INC, $dir if (-d $dir); | |||
| 13 | |||||||
| 14 | 19 | 521 | $added = 1; | ||||
| 15 | } | ||||||
| 16 | |||||||
| 17 | 1; |