| 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 | 7 | 7 | 47 | use strict; | |||
| 7 | 12 | ||||||
| 7 | 223 | ||||||
| 4 | 7 | 7 | 35 | use warnings; | |||
| 7 | 11 | ||||||
| 7 | 728 | ||||||
| 5 | |||||||
| 6 | my $added = 0; | ||||||
| 7 | |||||||
| 8 | sub import { | ||||||
| 9 | 19 | 100 | 19 | 255 | return if ($added); # prevent duplicates when invoked more than once | ||
| 10 | |||||||
| 11 | 7 | 23 | my $dir = substr(__FILE__, 0, -3); | ||||
| 12 | 7 | 50 | 133 | unshift @INC, $dir if (-d $dir); | |||
| 13 | |||||||
| 14 | 7 | 187 | $added = 1; | ||||
| 15 | } | ||||||
| 16 | |||||||
| 17 | 1; |