Skip Menu |

This queue is for tickets about the pmtools CPAN distribution.

Report information
The Basics
Id: 121522
Status: open
Priority: 0/
Queue: pmtools

People
Owner: Nobody in particular
Requestors: derkire [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: pmtool self-test failed for 'found a Perl FAQ POD'
Date: Wed, 3 May 2017 20:14:20 -0700
To: bug-pmtools [...] rt.cpan.org
From: Derk Ire <derkire [...] gmail.com>
In fedora 25 with perl 5.24, perl -MCPAN -e "install pmtools"; leads to the following error message and a failed installation: # Failed test 'found a Perl FAQ POD' # at t/faqpods.t line 19. # '' # doesn't match '(?^:perlfaq[0-9].pod)' # Looks like you failed 1 test of 2. t/faqpods.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Any ideas? Thx.
From: ppisar [...] redhat.com
Dne St 03.Květen.2017 23:14:33, derkire@gmail.com napsal(a): Show quoted text
> In fedora 25 with perl 5.24, > perl -MCPAN -e "install pmtools"; > leads to the following error message and a failed installation: > > > # Failed test 'found a Perl FAQ POD' > # at t/faqpods.t line 19. > # '' > # doesn't match '(?^:perlfaq[0-9].pod)' > # Looks like you failed 1 test of 2. > t/faqpods.t ...... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/2 subtests > > Any ideas? Thx.
That's because Fedora installs newer perlfaqs from CPAN into vendor path and there are no perlfaq POD files in the core path. A fix for pmtools used in Fedora is attached. I have no idea why it has not been submitted earlier. And yes, pmtool-2.0.0 is packaged in Fedora as perl-pmtools, you don't need to install it from CPAN. -- Petr
Subject: pmtools-2.0.0-perlfaq-in-vendorlib.patch
From 99569b1f5c2dc647ee345028927af8c54cf0ea6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@redhat.com> Date: Tue, 25 Aug 2015 15:58:57 +0200 Subject: [PATCH] faqpods: Check for vendorlib perlfaq if core perlfaq isn't available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fedora 24 introduced the perl-perlfaq package which may replace the core perl-perlfaq subpackage, installing its files into vendorlib. This patch ensures faqpods can still find them. Loosely based on basepods. Signed-off-by: Petr Å abata <contyk@redhat.com> --- bin/faqpods | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/faqpods b/bin/faqpods index a36f7c1..c1ff4e2 100755 --- a/bin/faqpods +++ b/bin/faqpods @@ -7,13 +7,27 @@ # ------ pragmas use strict; use warnings; +use Config; our $VERSION = '2.0.0'; +my $foundcore = undef; + open(PROG, "$^X -S basepods |") || die "can't fork: $!"; while (<PROG>) { - print if /perlfaq/; -} + if (/perlfaq/) { + print $_; + $foundcore = 1; + } +} + +unless ($foundcore) { + my $lib = $Config{'vendorlib'}; + opendir(LIB, $lib) || die "$0: can't opendir $lib: $!\n"; + while ($_ = readdir(LIB)) { + print "$lib/$_\n" if /perlfaq.*\.pod$/; + } +} __END__ @@ -29,6 +43,9 @@ directory whose names start in C<perlfaq> will be printed to the standard output, one per line. This is normally used in backticks to produce a list of filenames for other commands. +Alternatively, C<vendorlib> CPAN perlfaq files, if any, are listed in +case none are supplied by the core installation. + =head1 EXAMPLES $ podgrep typeglob `faqpods` -- 2.4.3