This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Let Deparse.t be run from the top-level
authorFather Chrysostomos <sprout@cpan.org>
Sun, 17 Sep 2017 18:18:15 +0000 (11:18 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 8 Oct 2017 19:06:31 +0000 (12:06 -0700)
It used to work before 851f7bb3.  It is helpful when debugging tests
to be able to run â€˜./perl -Ilib lib/B/Deparse.t’ without chdir-
ring around.

lib/B/Deparse.t

index 0ee9e9e..62570ed 100644 (file)
@@ -1,13 +1,13 @@
 #!./perl
 
 BEGIN {
-    unshift @INC, 't';
+    splice @INC, 0, 0, 't', '.';
     require Config;
     if (($Config::Config{'extensions'} !~ /\bB\b/) ){
         print "1..0 # Skip -- Perl configured without B module\n";
         exit 0;
     }
-    require './test.pl';
+    require 'test.pl';
 }
 
 use warnings;