line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1799
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
76
|
|
2
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
106
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package lib::byversion; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
2
|
|
|
2
|
|
69
|
$lib::byversion::AUTHORITY = 'cpan:KENTNL'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$lib::byversion::VERSION = '0.001001'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: add paths to @INC depending on which version of C is running. |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
1747
|
use lib (); |
|
2
|
|
|
|
|
1274
|
|
|
2
|
|
|
|
|
43
|
|
15
|
2
|
|
|
2
|
|
1659
|
use version 0.77; |
|
2
|
|
|
|
|
4675
|
|
|
2
|
|
|
|
|
15
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use String::Formatter stringf => { |
21
|
|
|
|
|
|
|
-as => path_format =>, |
22
|
|
|
|
|
|
|
codes => { |
23
|
|
|
|
|
|
|
v => "$]", |
24
|
2
|
|
|
|
|
12
|
V => do { |
25
|
2
|
|
|
|
|
40
|
my $x = version->parse("$]")->normal; |
26
|
2
|
|
|
|
|
22
|
$x =~ s{^v}{}; |
27
|
2
|
|
|
|
|
74
|
$x; |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
} |
30
|
2
|
|
|
2
|
|
1975
|
}; |
|
2
|
|
|
|
|
35128
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub import { |
33
|
0
|
|
|
0
|
|
|
my ( $self, @args ) = @_; |
34
|
0
|
0
|
|
|
|
|
if ( @args != 1 ) { |
35
|
0
|
|
|
|
|
|
die 'lib::byversion->import takes exactly one argument, instead, you specified ' . scalar @args; |
36
|
|
|
|
|
|
|
} |
37
|
0
|
|
|
|
|
|
my $path = path_format(@args); |
38
|
0
|
|
|
|
|
|
return lib->import($path); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
## no critic (ProhibitBuiltinHomonyms) |
42
|
|
|
|
|
|
|
sub unimport { |
43
|
0
|
|
|
0
|
|
|
my ( $self, @args ) = @_; |
44
|
0
|
0
|
|
|
|
|
if ( @args != 1 ) { |
45
|
0
|
|
|
|
|
|
die "lib::byversion->import takes exactly one argument, instead, you specified " . scalar @args; |
46
|
|
|
|
|
|
|
} |
47
|
0
|
|
|
|
|
|
my $path = path_format(@args); |
48
|
0
|
|
|
|
|
|
return lib->unimport($path); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |