line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ExtUtils::testlib; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
101307
|
use strict; |
|
2
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
162
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '7.70'; |
7
|
|
|
|
|
|
|
$VERSION =~ tr/_//d; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
17
|
use Cwd; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
196
|
|
10
|
2
|
|
|
2
|
|
20
|
use File::Spec; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
129
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# So the tests can chdir around and not break @INC. |
13
|
|
|
|
|
|
|
# We use getcwd() because otherwise rel2abs will blow up under taint |
14
|
|
|
|
|
|
|
# mode pre-5.8. We detaint is so @INC won't be tainted. This is |
15
|
|
|
|
|
|
|
# no worse, and probably better, than just shoving an untainted, |
16
|
|
|
|
|
|
|
# relative "blib/lib" onto @INC. |
17
|
|
|
|
|
|
|
my $cwd; |
18
|
|
|
|
|
|
|
BEGIN { |
19
|
2
|
|
|
2
|
|
165
|
($cwd) = getcwd() =~ /(.*)/; |
20
|
|
|
|
|
|
|
} |
21
|
2
|
|
|
2
|
|
1187
|
use lib map { File::Spec->rel2abs($_, $cwd) } qw(blib/arch blib/lib); |
|
2
|
|
|
|
|
1475
|
|
|
2
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
121
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
ExtUtils::testlib - add blib/* directories to @INC |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use ExtUtils::testlib; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
After an extension has been built and before it is installed it may be |
36
|
|
|
|
|
|
|
desirable to test it bypassing C<make test>. By adding |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use ExtUtils::testlib; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
to a test program the intermediate directories used by C<make> are |
41
|
|
|
|
|
|
|
added to @INC. |
42
|
|
|
|
|
|
|
|