This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to ExtUtils-MakeMaker-6.48
[perl5.git] / lib / ExtUtils / testlib.pm
CommitLineData
b0c8af80 1package ExtUtils::testlib;
1e65eb70
SP
2
3use strict;
a592ba15 4use warnings;
1e65eb70 5
b5b9b385 6our $VERSION = 6.48;
d713330a 7
9ce33444 8use Cwd;
f6d6199c 9use File::Spec;
9ce33444
MS
10
11# So the tests can chdir around and not break @INC.
12# We use getcwd() because otherwise rel2abs will blow up under taint
a67d7a01
MS
13# mode pre-5.8. We detaint is so @INC won't be tainted. This is
14# no worse, and probably better, than just shoving an untainted,
15# relative "blib/lib" onto @INC.
16my $cwd;
17BEGIN {
18 ($cwd) = getcwd() =~ /(.*)/;
19}
a592ba15 20use lib map { File::Spec->rel2abs($_, $cwd) } qw(blib/arch blib/lib);
b0c8af80
PP
211;
22__END__
23
24=head1 NAME
25
26ExtUtils::testlib - add blib/* directories to @INC
27
28=head1 SYNOPSIS
29
39234879 30 use ExtUtils::testlib;
b0c8af80
PP
31
32=head1 DESCRIPTION
33
34After an extension has been built and before it is installed it may be
35desirable to test it bypassing C<make test>. By adding
36
37 use ExtUtils::testlib;
38
39to a test program the intermediate directories used by C<make> are
40added to @INC.
41