This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re-fix do/@INC issue in Time-HiRes's Makefile.PL
authorZefram <zefram@fysh.org>
Wed, 19 Jul 2017 23:39:33 +0000 (00:39 +0100)
committerZefram <zefram@fysh.org>
Wed, 19 Jul 2017 23:45:35 +0000 (00:45 +0100)
Time-HiRes's Makefile.PL loads its hints file using do-file, and so
has needed to be updated for the removal of the implicit "." from @INC.
Commit 8b69401c2ba8d1ced2e17c24d6b51a7ce3882664 attempted to do this,
but put the explicit "." in the input to File::Spec->catfile, which
edits it back out.  Commit ba570843add681d44ff50ff219d1ce000a961663
fixed this problem, by moving the explicit "." into a string
concatenation after File::Spec->catfile has done its bit.  But commit
5cd155b07ed261125793850e101ebe6fa438c5e3 then reverted that fix,
apparently by mistake during preparation for a CPAN release.  This commit
reinstates the fix.

dist/Time-HiRes/Changes
dist/Time-HiRes/Makefile.PL

index b0dbed1..eb85a2c 100644 (file)
@@ -3,6 +3,7 @@ Revision history for the Perl extension Time::HiRes.
 1.9743
   - correct declared minimum Perl version (should be 5.6, was declared
     as 5.8 since 1.9727_03)
+  - fix the fix for 'do file' to load hints in Makefile.PL
 
 1.9742 [2017-04-16]
   - prefer 3-argument open: blead 1ae6ead9
index 08758b9..54f5cb4 100644 (file)
@@ -417,11 +417,11 @@ sub DEFINE {
 }
 
 sub init {
-    my $hints = File::Spec->catfile(".", "hints", "$^O.pl");
+    my $hints = File::Spec->catfile("hints", "$^O.pl");
     if (-f $hints) {
        print "Using hints $hints...\n";
        local $self;
-       do $hints;
+       do "./$hints";
        if (exists $self->{LIBS}) {
            $LIBS = $self->{LIBS};
            print "Extra libraries: @$LIBS...\n";