line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package lib::absolute; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
3
|
|
|
3
|
|
9773
|
$lib::absolute::AUTHORITY = 'cpan:GETTY'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$lib::absolute::VERSION = '0.004'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: Convert all paths in @INC to absolute paths |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
29
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
114
|
|
11
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
125
|
|
12
|
3
|
|
|
3
|
|
1066
|
use Path::Class; |
|
3
|
|
|
|
|
78933
|
|
|
3
|
|
|
|
|
724
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub import { |
15
|
3
|
|
|
3
|
|
32
|
my ( $self, @args ) = @_; |
16
|
3
|
|
|
|
|
9
|
my $hard = grep { $_ eq '-hard' } @args; |
|
1
|
|
|
|
|
4
|
|
17
|
|
|
|
|
|
|
@INC = map { |
18
|
3
|
50
|
|
|
|
8
|
if (ref $_) { |
|
24
|
|
|
|
|
435
|
|
19
|
0
|
|
|
|
|
0
|
$_; |
20
|
|
|
|
|
|
|
} else { |
21
|
24
|
|
|
|
|
66
|
my $dir = dir($_)->absolute; |
22
|
24
|
100
|
|
|
|
2653
|
if ($hard) { |
23
|
1
|
50
|
|
|
|
5
|
die $dir.' of @INC doesn\'t exist' unless -d $dir; |
24
|
|
|
|
|
|
|
} |
25
|
23
|
100
|
|
|
|
58
|
$dir->stringify, $_ eq '.' ? '.' : (); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} @INC; |
28
|
2
|
|
|
|
|
73
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |