line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package lib::tiny; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# use strict; # this works but is disabled for production, since it doesn't gain any thing in this mod and adds appx 184K to memory |
4
|
|
|
|
|
|
|
$lib::tiny::VERSION = 0.7; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub import { |
7
|
3
|
|
|
3
|
|
127407
|
shift; |
8
|
3
|
|
|
|
|
8
|
my %seen; |
9
|
3
|
|
|
|
|
14
|
for ( reverse @_ ) { |
10
|
5
|
50
|
33
|
|
|
52
|
next if !defined $_ || $_ eq ''; |
11
|
5
|
50
|
|
|
|
149
|
unshift @INC, $_ if -d $_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# if we can do this without Config and 'tiny' File::Spec-ness to properly join their names into a path... |
14
|
|
|
|
|
|
|
# handle '$_/@{'inc_version_list'} here |
15
|
|
|
|
|
|
|
# unshift @INC, "$_/$archname") if -d "$_/$archname/auto"; |
16
|
|
|
|
|
|
|
# unshift @INC, "$_/$version") if -d "$_/$version"; |
17
|
|
|
|
|
|
|
# unshift @INC, "$_/$version/$archname") if -d "$_/$version/$archname"; |
18
|
|
|
|
|
|
|
} |
19
|
3
|
|
|
|
|
11
|
@INC = grep { $seen{$_}++ == 0 } @INC; |
|
38
|
|
|
|
|
162
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub unimport { |
23
|
3
|
|
|
3
|
|
533
|
shift; |
24
|
3
|
|
|
|
|
5
|
my %ditch; |
25
|
3
|
|
|
|
|
14
|
@ditch{@_} = (); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# if import ever does version/archname/inc_version_list paths we need to remove them here |
28
|
3
|
|
|
|
|
7
|
@INC = grep { !exists $ditch{$_} } @INC; |
|
36
|
|
|
|
|
94
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |