Skip Menu |

This queue is for tickets about the Pod-Usage CPAN distribution.

Report information
The Basics
Id: 130418
Status: resolved
Estimated: 30 min
Priority: 0/
Queue: Pod-Usage

Owner: Marek.Rouchal [...]
Requestors: cberry [...]

Bug Information
Severity: Important
Broken in: 1.69
Fixed in: 1.70

Subject: [PATCH] Fix parent directory in pod2usage auxiliary script.
Download (untitled) / with headers
text/plain 703b
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. The patch is against blead so apply with patch -p2. Side note. Most of the uses of catfile in this module's tests should really be catdir. If you want the result to be a valid directory spec, use catdir, not catfile. We seem to be getting away with it for entries in @INC, but in other contexts that mix-up will fail.
Subject: testp2pt.patch
Download testp2pt.patch
text/x-diff 419b
--- cpan/Pod-Usage/t/pod/;-0 2017-10-18 05:29:59 -0500 +++ cpan/Pod-Usage/t/pod/ 2019-08-30 08:52:25 -0500 @@ -11,7 +11,7 @@ BEGIN { unshift @INC, $THISDIR; require ""; import TestCompare; - $PARENTDIR = dirname $THISDIR; + $PARENTDIR = File::Spec->catdir($THISDIR, File::Spec->updir()); push @INC, map { File::Spec->catfile($_, 'lib') } ($PARENTDIR, $THISDIR); }
Download (untitled) / with headers
text/plain 133b
Thank you - patch accepted. And sorry for the long wait. And thank you for the hin wrt. catfile/catdir; reviewed the code and fixed.
Closing as fixed in Pod-Usage-1.70. Thank you for your patience. -Marek

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to