| blib/lib/lib/ini/plugin/dir.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 14 | 92.8 |
| branch | 2 | 4 | 50.0 |
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 19 | 23 | 82.6 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package lib::ini::plugin::dir; | ||||||
| 2 | { | ||||||
| 3 | $lib::ini::plugin::dir::VERSION = '0.002'; | ||||||
| 4 | } | ||||||
| 5 | |||||||
| 6 | # ABSTRACT: Add directories to @INC | ||||||
| 7 | |||||||
| 8 | 1 | 1 | 88149 | use strict; | |||
| 1 | 3 | ||||||
| 1 | 39 | ||||||
| 9 | 1 | 1 | 7 | use warnings; | |||
| 1 | 2 | ||||||
| 1 | 25 | ||||||
| 10 | 1 | 1 | 5 | use base 'lib::ini::plugin'; | |||
| 1 | 2 | ||||||
| 1 | 586 | ||||||
| 11 | |||||||
| 12 | sub generate_inc { | ||||||
| 13 | 1 | 1 | 0 | 16 | my ($class, %args) = @_; | ||
| 14 | 1 | 50 | 5 | my $dir = $args{dir} or return; | |||
| 15 | |||||||
| 16 | 1 | 50 | 3 | if ( ref $dir) { | |||
| 17 | 1 | 11 | return @$dir; | ||||
| 18 | } else { | ||||||
| 19 | 0 | return $dir; | |||||
| 20 | } | ||||||
| 21 | } | ||||||
| 22 | |||||||
| 23 | 1; | ||||||
| 24 | |||||||
| 25 | __END__ |