line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
41330
|
use 5.006; |
|
4
|
|
|
|
|
11
|
|
2
|
4
|
|
|
4
|
|
18
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
89
|
|
3
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
280
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package lib::byversion; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.002002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: add paths to @INC depending on which version of Perl is running. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
1796
|
use lib (); |
|
4
|
|
|
|
|
2265
|
|
|
4
|
|
|
|
|
95
|
|
14
|
4
|
|
|
4
|
|
1639
|
use version 0.77; |
|
4
|
|
|
|
|
6807
|
|
|
4
|
|
|
|
|
24
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use String::Formatter stringf => { |
17
|
|
|
|
|
|
|
-as => path_format =>, |
18
|
|
|
|
|
|
|
codes => { |
19
|
|
|
|
|
|
|
v => "$]", |
20
|
4
|
|
|
|
|
22
|
V => do { |
21
|
4
|
|
|
|
|
75
|
my $x = version->parse("$]")->normal; |
22
|
4
|
|
|
|
|
43
|
$x =~ s{^v}{}sx; |
23
|
4
|
|
|
|
|
51
|
$x; |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
}, |
26
|
4
|
|
|
4
|
|
2451
|
}; |
|
4
|
|
|
|
|
59096
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub import { |
29
|
2
|
|
|
2
|
|
23
|
my ( undef, @args ) = @_; |
30
|
2
|
50
|
|
|
|
11
|
if ( @args != 1 ) { |
31
|
0
|
|
|
|
|
0
|
die 'lib::byversion->import takes exactly one argument, instead, you specified ' . scalar @args; |
32
|
|
|
|
|
|
|
} |
33
|
2
|
|
|
|
|
10
|
my $path = path_format(@args); |
34
|
2
|
|
|
|
|
329
|
return lib->import($path); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
## no critic (ProhibitBuiltinHomonyms) |
38
|
|
|
|
|
|
|
sub unimport { |
39
|
1
|
|
|
1
|
|
130
|
my ( undef, @args ) = @_; |
40
|
1
|
50
|
|
|
|
4
|
if ( @args != 1 ) { |
41
|
0
|
|
|
|
|
0
|
die 'lib::byversion->unimport takes exactly one argument, instead, you specified ' . scalar @args; |
42
|
|
|
|
|
|
|
} |
43
|
1
|
|
|
|
|
4
|
my $path = path_format(@args); |
44
|
1
|
|
|
|
|
88
|
return lib->unimport($path); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |