blib/lib/lib/glob.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 13 | 84.6 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | n/a | ||
total | 15 | 17 | 88.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package lib::glob; | ||||||
2 | |||||||
3 | 1 | 1 | 26609 | use warnings; | |||
1 | 4 | ||||||
1 | 77 | ||||||
4 | 1 | 1 | 7 | use strict; | |||
1 | 3 | ||||||
1 | 63 | ||||||
5 | |||||||
6 | our $VERSION = '0.02'; | ||||||
7 | |||||||
8 | 1 | 1 | 7 | use File::Glob qw(bsd_glob); | |||
1 | 15 | ||||||
1 | 323 | ||||||
9 | |||||||
10 | my $sep = quotemeta($^O =~ /Win32/ ? ';' : ':'); | ||||||
11 | |||||||
12 | sub import { | ||||||
13 | 1 | 1 | 10 | my $class = shift; | |||
14 | 1 | 24 | for (split /$sep/o, join ',', @_) { | ||||
15 | # print "looking for libraries in $_\n"; | ||||||
16 | 0 | my @paths = bsd_glob($_); | |||||
17 | 0 | push @INC, @paths; | |||||
18 | } | ||||||
19 | } | ||||||
20 | |||||||
21 | 1; | ||||||
22 | __END__ |