Skip Menu |

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

Maintainer(s)' notes

Please use Github for all future tickets, patches and pull requests: https://github.com/Dual-Life/Pod-Usage

Thanks to Nicolas R (ATOOMIC) for setting up everything there!

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

People
Owner: Marek.Rouchal [...] gmx.net
Requestors: cberry [...] cpan.org
Cc:
AdminCc:

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



Subject: [PATCH] Fix parent directory in pod2usage auxiliary script.
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
--- cpan/Pod-Usage/t/pod/testp2pt.pl;-0 2017-10-18 05:29:59 -0500 +++ cpan/Pod-Usage/t/pod/testp2pt.pl 2019-08-30 08:52:25 -0500 @@ -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); }
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