summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort/mktests.PL
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-24 11:16:24 -0600
committerNicolas R <atoomic@cpan.org>2019-11-08 12:01:13 -0700
commit6004d0b536ae2cf70b819b00b06aac42ce5ee7c1 (patch)
treea3dfeba7b7e98443d82e445da622815cdda95be8 /dist/Devel-PPPort/mktests.PL
parent5738fd423d16ea7bd432e3bca55c98d22996bbfd (diff)
downloadperl-6004d0b536ae2cf70b819b00b06aac42ce5ee7c1.tar.gz
mktests.PL: Require inctools in .t files
This will allow them to use the functions therein. (cherry picked from commit 48bb078538a75f644588489b4d59f39d1d3d5711) Signed-off-by: Nicolas R <atoomic@cpan.org>
Diffstat (limited to 'dist/Devel-PPPort/mktests.PL')
-rw-r--r--dist/Devel-PPPort/mktests.PL13
1 files changed, 9 insertions, 4 deletions
diff --git a/dist/Devel-PPPort/mktests.PL b/dist/Devel-PPPort/mktests.PL
index bca0475b8d..ae776c44db 100644
--- a/dist/Devel-PPPort/mktests.PL
+++ b/dist/Devel-PPPort/mktests.PL
@@ -72,10 +72,12 @@ __DATA__
#
################################################################################
+use FindBin ();
+
BEGIN {
if ($ENV{'PERL_CORE'}) {
chdir 't' if -d 't';
- @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ unshift @INC, '../lib' if -d '../lib' && -d '../ext';
require Config; import Config;
use vars '%Config';
if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
@@ -83,13 +85,16 @@ BEGIN {
exit 0;
}
}
- else {
- unshift @INC, 't';
- }
+
+ use lib "$FindBin::Bin";
+ use lib "$FindBin::Bin/../parts/inc";
+
+ die qq[Cannot find "$FindBin::Bin/../parts/inc"] unless -d "$FindBin::Bin/../parts/inc";
sub load {
eval "use Test";
require 'testutil.pl' if $@;
+ require 'inctools';
}
if (__PLAN__) {