X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/b0c8af803cbec7e5d759c7c22271301e52da6f41..75e3c8a32e5d9a53167aa1dbfdc9809cfea8cabf:/lib/ExtUtils/testlib.pm diff --git a/lib/ExtUtils/testlib.pm b/lib/ExtUtils/testlib.pm index d559604..ab0ab897 100644 --- a/lib/ExtUtils/testlib.pm +++ b/lib/ExtUtils/testlib.pm @@ -1,5 +1,23 @@ package ExtUtils::testlib; -use lib qw(blib/arch blib/lib); + +use strict; +use warnings; + +our $VERSION = 6.53_03; + +use Cwd; +use File::Spec; + +# So the tests can chdir around and not break @INC. +# We use getcwd() because otherwise rel2abs will blow up under taint +# mode pre-5.8. We detaint is so @INC won't be tainted. This is +# no worse, and probably better, than just shoving an untainted, +# relative "blib/lib" onto @INC. +my $cwd; +BEGIN { + ($cwd) = getcwd() =~ /(.*)/; +} +use lib map { File::Spec->rel2abs($_, $cwd) } qw(blib/arch blib/lib); 1; __END__ @@ -9,7 +27,7 @@ ExtUtils::testlib - add blib/* directories to @INC =head1 SYNOPSIS -C + use ExtUtils::testlib; =head1 DESCRIPTION