summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-05-12 16:54:37 +0000
committerNorbert Preining <preining@logic.at>2010-05-12 16:54:37 +0000
commit661c41a09e39a182865e0b51e34cc995a0dc96e8 (patch)
tree2f79bb1406e22fdcb2587be8ffda6c0c609d7932 /Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm
parentb645030efc22e13c2498a1522083634ab91b2de1 (diff)
move tlperl.straw to tlperl
git-svn-id: svn://tug.org/texlive/trunk@18210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm')
-rwxr-xr-xMaster/tlpkg/tlperl/lib/ExtUtils/testlib.pm41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm b/Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm
new file mode 100755
index 00000000000..fe01beb0e1e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/ExtUtils/testlib.pm
@@ -0,0 +1,41 @@
+package ExtUtils::testlib;
+
+use strict;
+use warnings;
+
+our $VERSION = 6.56;
+
+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__
+
+=head1 NAME
+
+ExtUtils::testlib - add blib/* directories to @INC
+
+=head1 SYNOPSIS
+
+ use ExtUtils::testlib;
+
+=head1 DESCRIPTION
+
+After an extension has been built and before it is installed it may be
+desirable to test it bypassing C<make test>. By adding
+
+ use ExtUtils::testlib;
+
+to a test program the intermediate directories used by C<make> are
+added to @INC.
+