This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix parent directory in pod2usage auxiliary script.
authorCraig A. Berry <craigberry@mac.com>
Fri, 30 Aug 2019 16:28:42 +0000 (11:28 -0500)
committerCraig A. Berry <craigberry@mac.com>
Fri, 30 Aug 2019 18:33:47 +0000 (13:33 -0500)
File::Basename::dirname does not always remove the last component
of the path if that component is already a directory, depending on
platform.  This behavior is documented. pod2usage.t has been
failing on VMS because we get the wrong directory into @INC.

So, since we already have File::Spec loaded, just use the more
obvious and portable method for getting the parent directory.

Reported upstream at:

   <https://rt.cpan.org/Ticket/Display.html?id=130418>

Porting/Maintainers.pl
cpan/Pod-Usage/t/pod/testp2pt.pl
t/porting/customized.dat

index 305af6d..833476f 100755 (executable)
@@ -924,6 +924,9 @@ use File::Glob qw(:case);
     'Pod::Usage' => {
         'DISTRIBUTION' => 'MAREKR/Pod-Usage-1.69.tar.gz',
         'FILES'        => q[cpan/Pod-Usage],
+        'CUSTOMIZED'   => [
+            't/pod/testp2pt.pl',
+        ],
     },
 
     'podlators' => {
index cd31245..7205753 100644 (file)
@@ -11,7 +11,7 @@ BEGIN {
    unshift @INC, $THISDIR;
    require "testcmp.pl";
    import TestCompare;
-   $PARENTDIR = dirname $THISDIR;
+   $PARENTDIR = File::Spec->catdir($THISDIR, File::Spec->updir());
    push @INC, map { File::Spec->catfile($_, 'lib') } ($PARENTDIR, $THISDIR);
 }
 
index 76b5044..b386353 100644 (file)
@@ -15,6 +15,7 @@ Pod::Checker cpan/Pod-Checker/t/pod/selfcheck.t 8ce3cfd38e4b9bcf5bc7fe7f2a14195e
 Pod::Checker cpan/Pod-Checker/t/pod/testcmp.pl a0cd5c8eca775c7753f4464eee96fa916e3d8a16
 Pod::Checker cpan/Pod-Checker/t/pod/testpchk.pl b2072c7f4379fd050e15424175d7cac5facf5b3b
 Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm 582be34c077c9ff44d99914724a0cc2140bcd48c
+Pod::Usage cpan/Pod-Usage/t/pod/testp2pt.pl d43ea8391bd95aefdb710ab2947771155a88d424
 autodie cpan/autodie/lib/autodie/exception.pm b99e4e35a9ed36de94d54437888822ced4936207
 autodie cpan/autodie/lib/autodie/hints.pm e1998fec61fb4e82fe46585bd82c73200be6f262
 autodie cpan/autodie/t/exceptions.t ad315a208f875e06b0964012ce8d65daa438c036