Commit | Line | Data |
b0c8af80 |
1 | package ExtUtils::testlib; |
562c8117 |
2 | $VERSION = 1.16; |
d713330a |
3 | |
9ce33444 |
4 | use Cwd; |
f6d6199c |
5 | use File::Spec; |
9ce33444 |
6 | |
7 | # So the tests can chdir around and not break @INC. |
8 | # We use getcwd() because otherwise rel2abs will blow up under taint |
a67d7a01 |
9 | # mode pre-5.8. We detaint is so @INC won't be tainted. This is |
10 | # no worse, and probably better, than just shoving an untainted, |
11 | # relative "blib/lib" onto @INC. |
12 | my $cwd; |
13 | BEGIN { |
14 | ($cwd) = getcwd() =~ /(.*)/; |
15 | } |
16 | use lib map File::Spec->rel2abs($_, $cwd), qw(blib/arch blib/lib); |
b0c8af80 |
17 | 1; |
18 | __END__ |
19 | |
20 | =head1 NAME |
21 | |
22 | ExtUtils::testlib - add blib/* directories to @INC |
23 | |
24 | =head1 SYNOPSIS |
25 | |
39234879 |
26 | use ExtUtils::testlib; |
b0c8af80 |
27 | |
28 | =head1 DESCRIPTION |
29 | |
30 | After an extension has been built and before it is installed it may be |
31 | desirable to test it bypassing C<make test>. By adding |
32 | |
33 | use ExtUtils::testlib; |
34 | |
35 | to a test program the intermediate directories used by C<make> are |
36 | added to @INC. |
37 | |