Skip Menu |
 

This queue is for tickets about the pmtools CPAN distribution.

Report information
The Basics
Id: 89006
Status: resolved
Priority: 0/
Queue: pmtools

People
Owner: MLFISHER [...] cpan.org
Requestors: abe [...] debian.org
Cc:
AdminCc:

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

Attachments
fix-carp-has-no-pod-for-test-suite.patch



Subject: Carp has no POD on my 5.18.1 installation -> still test suite failures with 1.51
Date: Fri, 27 Sep 2013 22:32:53 +0200
To: bug-pmtools [...] rt.cpan.org
From: Axel Beckert <abe [...] debian.org>
Download (untitled) / with headers
text/plain 3.1k
Hi Mark, thanks for the quick 1.51 bug fix release. Much appreciated since I don't want to disable running the test suite at build time for the Debian package of pmtools. In the Changes for 1.51 you write: - Fixed t/pman.t, t/pmcat.t, and t/pmdesc.t to use the Carp module because Carp always has POD (Tie::Hash may not depending on the Perl version, and see above for Scalar::Util problems). Unfortunately this seems not true. On Debian Unstable with Perl 5.18.1 (from packages): → env PATH="bin:$PATH" prove t/*.t t/basepods.t .. ok t/faqpods.t ... ok t/modpods.t ... ok t/pfcat.t ..... ok t/plxload.t ... ok t/pmall.t ..... ok t/pman.t ...... 1/2 # Failed test 'found Carp' # at t/pman.t line 19. # 'pod2text: unable to format /usr/share/perl/5.18/Carp.pm # ' # doesn't match '(?^ms:NAME.*[Cc]arp - \w.*SYNOPSIS.*DESCRIPTION)' # Looks like you failed 1 test of 2. t/pman.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests t/pmcat.t ..... 1/2 # Failed test 'catted Carp' # at t/pmcat.t line 19. # 'package Carp; # # { use 5.006; } # use strict; # use warnings; […] # 1; # # __END__ # # ' # doesn't match '(?^ms:.*package Carp\;.*\=head1 SYNOPSIS)' # Looks like you failed 1 test of 2. t/pmcat.t ..... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests t/pmcheck.t ... ok t/pmdesc.t .... 1/2 # Failed test 'pmdesc runs' # at t/pmdesc.t line 18. # got: '256' # expected: '0' # Failed test 'described a module' # at t/pmdesc.t line 19. # 'no description found # ' # doesn't match '(?^:Carp \(\d+\.\d+\) - \w)' # Looks like you failed 2 tests of 2. t/pmdesc.t .... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests t/pmeth.t ..... ok t/pmexp.t ..... ok t/pmfunc.t .... ok t/pmload.t .... ok t/pmls.t ...... ok t/pmpath.t .... ok t/pmvers.t .... ok t/podgrep.t ... ok t/pods.t ...... ok t/podtoc.t .... ok t/sitepods.t .. ok t/stdpods.t ... ok Test Summary Report ------------------- t/pman.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 t/pmcat.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 t/pmdesc.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Files=22, Tests=42, 9 wallclock secs ( 0.12 usr 0.18 sys + 5.99 cusr 2.46 csys = 8.75 CPU) Result: FAIL And I checked manually: There's really no POD in Carp.pm here. $ pmpath Carp /usr/share/perl/5.18/Carp.pm $ egrep '^=' /usr/share/perl/5.18/Carp.pm $ I'm not sure if continuousky guessing which module could have "always" POD is really the way to go, but I've no better idea currently either. In my case English.pm would have worked, so I suggest to use that: $ egrep '^=' /usr/share/perl/5.18/English.pm =head1 NAME =head1 SYNOPSIS =head1 DESCRIPTION =head1 PERFORMANCE =cut $ Regards, Axel -- ,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
Subject: Re: [rt.cpan.org #89006] AutoReply: Carp has no POD on my 5.18.1 installation -> still test suite failures with 1.51
Date: Fri, 27 Sep 2013 22:42:04 +0200
To: Bugs in pmtools via RT <bug-pmtools [...] rt.cpan.org>
From: Axel Beckert <abe [...] debian.org>
Download (untitled) / with headers
text/plain 2.3k
Hi again On Fri, Sep 27, 2013 at 04:33:07PM -0400, Bugs in pmtools via RT wrote: Show quoted text
> I'm not sure if continuousky guessing which module could have "always" > POD is really the way to go, but I've no better idea currently either. > In my case English.pm would have worked, so I suggest to use that:
Works for me. The following patch makes the testsuite pass on Debian Unstable: Index: pmtools/t/pmdesc.t =================================================================== --- pmtools.orig/t/pmdesc.t 2013-09-27 22:12:10.000000000 +0200 +++ pmtools/t/pmdesc.t 2013-09-27 22:37:05.000000000 +0200 @@ -12,8 +12,8 @@ $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pmdesc Carp 2>&1`; + $output = `bin/pmdesc English 2>&1`; }; is($?, 0, "pmdesc runs"); -like($output, qr/Carp \(\d+\.\d+\) - \w/, "described a module"); +like($output, qr/English \(\d+\.\d+\) - \w/, "described a module"); Index: pmtools/t/pman.t =================================================================== --- pmtools.orig/t/pman.t 2013-09-27 22:12:10.000000000 +0200 +++ pmtools/t/pman.t 2013-09-27 22:37:54.000000000 +0200 @@ -12,8 +12,8 @@ $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pman Carp 2>&1`; + $output = `bin/pman English 2>&1`; }; is($?, 256, "pman runs"); -like($output, qr/NAME.*[Cc]arp - \w.*SYNOPSIS.*DESCRIPTION/ms, "found Carp"); +like($output, qr/NAME.*[Ee]nglish - \w.*SYNOPSIS.*DESCRIPTION/ms, "found English"); Index: pmtools/t/pmcat.t =================================================================== --- pmtools.orig/t/pmcat.t 2013-09-27 22:12:10.000000000 +0200 +++ pmtools/t/pmcat.t 2013-09-27 22:38:43.000000000 +0200 @@ -12,8 +12,8 @@ $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pmcat Carp 2>&1`; + $output = `bin/pmcat English 2>&1`; }; is($?, 0, "pmcat runs"); -like($output, qr/.*package Carp\;.*\=head1 SYNOPSIS/ms, "catted Carp"); +like($output, qr/.*package English\;.*\=head1 SYNOPSIS/ms, "catted English"); Regards, Axel -- ,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
RT-Send-CC: markleightonfisher [...] gmail.com
Download (untitled) / with headers
text/plain 308b
Abe, can you look at your Carp.pm and see if it even remotely resembles https://metacpan.org/source/RJBS/perl-5.18.1/dist/Carp/lib/Carp.pm (which is my /home/markleightonfisher/perl5/perlbrew/perls/perl-5.18.1/lib/5.18.1/Carp.pm, which does have POD)? I'm wondering if pmtools are finding the wrong Carp.pm.
CC: debian-perl [...] lists.debian.org
Subject: Re: [rt.cpan.org #89006] Carp has no POD on my 5.18.1 installation -> still test suite failures with 1.51
Date: Sun, 29 Sep 2013 16:11:31 +0200
To: Mark Leighton Fisher via RT <bug-pmtools [...] rt.cpan.org>
From: Axel Beckert <abe [...] debian.org>
Download (untitled) / with headers
text/plain 1.5k
Hi Mark, On Sat, Sep 28, 2013 at 07:33:07PM -0400, Mark Leighton Fisher via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=89006 > > > Abe, can you look at your Carp.pm and see if it even remotely > resembles > https://metacpan.org/source/RJBS/perl-5.18.1/dist/Carp/lib/Carp.pm
The code is identical, it just lacks the POD: $ diff /usr/share/perl/5.18/Carp.pm /tmp/Carp.pm | diffstat unknown | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) (/tmp/Carp.pm is the one downloaded from http://api.metacpan.org/source/RJBS/perl-5.18.1/dist/Carp/lib/Carp.pm) It's possible that Debian splits PM and POD of (some, but not all[1]) core modules for packaging. Debian's perl source package builds at least four binary packages: perl-base (the interpreter itself), perl-modules (all core modules), perl-doc (the perl-doc script and documentation to core modules) and perl (a metapackage pulling in at least perl-base and perl-modules). Cc'ing the debian-perl mailing list to get some enlightenment about the reasons behind this and e.g. on which modules can be relied on to always be installed and always contain POD. Show quoted text
> I'm wondering if pmtools are finding the wrong Carp.pm.
No, it's definitely the right Carp.pm. [1] English.pm seems to have POD. Regards, Axel -- ,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
Subject: Re: [rt.cpan.org #89006] Carp has no POD on my 5.18.1 installation -> still test suite failures with 1.51
Date: Sun, 29 Sep 2013 16:34:46 +0100
To: Mark Leighton Fisher via RT <bug-pmtools [...] rt.cpan.org>, debian-perl [...] lists.debian.org
From: Dominic Hargreaves <dom [...] earth.li>
Download (untitled) / with headers
text/plain 1.7k
On Sun, Sep 29, 2013 at 04:11:31PM +0200, Axel Beckert wrote: Show quoted text
> It's possible that Debian splits PM and POD of (some, but not all[1]) > core modules for packaging. Debian's perl source package builds at > least four binary packages: perl-base (the interpreter itself), > perl-modules (all core modules), perl-doc (the perl-doc script and > documentation to core modules) and perl (a metapackage pulling in at > least perl-base and perl-modules).
That's not quite the right definition; perl-base contains the interpreter and a minimal set of libraries which will always be installed on Debian systems; perl-modules contains the architecture independent (non-XS modules) and the perl package contains the rest (ie perl isn't just a metapackage). perl-doc does indeed include some .pod files extracted/stripped from the modules installed in perl-base. This is done with the splitdoc script[1]. Show quoted text
> Cc'ing the debian-perl mailing list to get some enlightenment about > the reasons behind this
I would imagine the reason that this has been done (since 2001, btw: perl (5.6.1-1) unstable; urgency=low ... * Changes to perl-base: + Move [massive] upstream changelog to perl. + Move autoloaded routines from POSIX to perl. + Strip pod from modules into separate .pod files, distributed with perl-doc. ... -- Brendan O'Dea <bod@debian.org> Mon, 21 May 2001 03:43:18 +1000 ) is mainly to keep perl-base as small as possible. Show quoted text
> and e.g. on which modules can be relied on to > always be installed and always contain POD.
so interpreting this strictly, no module is guaranteed to be installed and have POD, since only perl-base modules are guaranteed to be installed. Dominic. [1] <http://anonscm.debian.org/gitweb/?p=perl/perl.git;a=blob;f=debian/splitdoc;h=252f337c43b55ea02b71c7eae74f7aec99c4fab4;hb=HEAD>
Download (untitled) / with headers
text/plain 329b
На 27 септ. 2013, пт 23:42:15, abe@debian.org написа: Show quoted text
> Works for me. The following patch makes the testsuite pass on Debian > Unstable:
Attached is an updated patch which allows underscore ("_") in version. Fixes test failure with perl 5.18.2, which seems to ship with English.pm version 1.06_01. Cheers, dam
Subject: fix-carp-has-no-pod-for-test-suite.patch
Description: Use English instead of Carp in POD-related tests Carp has no POD in Debian's Perl 5.18.1 and hence those tests fail Author: Axel Beckert <abe@debian.org> Bug: https://rt.cpan.org/Public/Bug/Display.html?id=89006 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=89006#txn-1267890 --- a/t/pmdesc.t +++ b/t/pmdesc.t @@ -12,8 +12,8 @@ my $output = undef; # output from pmdesc $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pmdesc Carp 2>&1`; + $output = `bin/pmdesc English 2>&1`; }; is($?, 0, "pmdesc runs"); -like($output, qr/Carp \(\d+\.\d+\) - \w/, "described a module"); +like($output, qr/English \(\d+\.[\d_]+\) - \w/, "described a module"); --- a/t/pman.t +++ b/t/pman.t @@ -12,8 +12,8 @@ my $output = undef; # output from pman $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pman Carp 2>&1`; + $output = `bin/pman English 2>&1`; }; is($?, 256, "pman runs"); -like($output, qr/NAME.*[Cc]arp - \w.*SYNOPSIS.*DESCRIPTION/ms, "found Carp"); +like($output, qr/NAME.*[Ee]nglish - \w.*SYNOPSIS.*DESCRIPTION/ms, "found English"); --- a/t/pmcat.t +++ b/t/pmcat.t @@ -12,8 +12,8 @@ my $output = undef; # output from pmcat $ENV{"PATH"} = 'blib/script:' . $ENV{"PATH"}; eval { - $output = `bin/pmcat Carp 2>&1`; + $output = `bin/pmcat English 2>&1`; }; is($?, 0, "pmcat runs"); -like($output, qr/.*package Carp\;.*\=head1 SYNOPSIS/ms, "catted Carp"); +like($output, qr/.*package English\;.*\=head1 SYNOPSIS/ms, "catted English");
Download (untitled) / with headers
text/plain 181b
This bug should be fixed with v2.0.0. pman and podpath use the new pmtools::new_pod_iterator() to iterate over all 3 of the POD locations (.pm, .pod, pod/MODULE.pod) in all of @INC.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.