Skip Menu |

This queue is for tickets about the parent CPAN distribution.

Report information
The Basics
Id: 102626
Status: resolved
Priority: 0/
Queue: parent

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
wolfsage [...] gmail.com
Cc: ether [...] cpan.org
ribasushi [...] leporine.io
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.229
  • 0.230
  • 0.231
  • 0.232
Fixed in: 0.236



Subject: parent .229 isn't usable on perls older than 5.14
Date: Sat, 7 Mar 2015 17:46:19 -0500
To: bug-parent [...] rt.cpan.org
From: "Matthew Horsfall (alh)" <wolfsage [...] gmail.com>
The latest version of parent includes this in t/parent-pmc.t: foreach(Config::non_bincompat_options()) { if($_ eq "PERL_DISABLE_PMC"){ $no_pmc = 1; last; } } Unfortunately, Config::non_bincompat_options wasn't added until 5.14.0, so this won't install on older versions of perl. -- Matthew Horsfall (alh)
Tests fixed with 0.230 on its way to CPAN
On Mon Mar 09 14:53:48 2015, CORION wrote: Show quoted text
> Tests fixed with 0.230 on its way to CPAN
Howdy. The proposed fix doesn't appear to work. See this example test: perl -e 'use Config; if (exists $Config::{fake}) { Config::fake() }' By doing "Config::fake()", we cause the $Config::{fake} symbol to exist, so this test doesn't do what you think. Attached is a patch that works all the way back to 5.8.1 at least (and is likely okay back until perl 5.003 where it looks like can() isn't available by default). Cheers, -- Matthew Horsfall (alh)
Subject: pmc.patch
diff -ur parent-0.230/t/parent-pmc.t parent-0.230-patched/t/parent-pmc.t --- parent-0.230/t/parent-pmc.t 2015-03-09 14:51:57.000000000 -0400 +++ parent-0.230-patched/t/parent-pmc.t 2015-03-09 15:43:11.159629914 -0400 @@ -14,7 +14,8 @@ plan skip_all => ".pmc are only available with 5.6 and later" if $] < 5.006; my $no_pmc; -if( exists $Config::{non_bincompat_options}) { + +if (Config->can('non_bincompat_options')) { foreach(Config::non_bincompat_options()) { if($_ eq "PERL_DISABLE_PMC"){ $no_pmc = 1;
Subject: Re: [rt.cpan.org #102626] parent .229 isn't usable on perls older than 5.14
Date: Mon, 09 Mar 2015 21:00:29 +0100
To: bug-parent [...] rt.cpan.org
From: Max Maischein <corion [...] cpan.org>
Hello Matthew, thanks! I didn't find an old version to test this with and it didn't occur to me to test the reverse with a fake name! Your change is on its way to CPAN as 0.231 - if that doesn't work the test fix will have to wait until Sunday ;) -max Am 09.03.2015 um 20:46 schrieb Matthew Horsfall via RT: Show quoted text
> Queue: parent > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102626 > > > On Mon Mar 09 14:53:48 2015, CORION wrote:
>> Tests fixed with 0.230 on its way to CPAN
> > Howdy. The proposed fix doesn't appear to work. See this example test: > > perl -e 'use Config; if (exists $Config::{fake}) { Config::fake() }' > > By doing "Config::fake()", we cause the $Config::{fake} symbol to exist, so this test doesn't do what you think. > > Attached is a patch that works all the way back to 5.8.1 at least (and is likely okay back until perl 5.003 where it looks like can() isn't available by default). > > Cheers, > > -- Matthew Horsfall (alh) >
The fix in 0.231 is still incomplete.
On a perl 5.10.1 (that doesn't have non_bincompat_options) with PERL_DISABLE_PMC=1 the test fails.

The clean fix is to check PERL_DISABLE_PMC using Config::Perl::V as I suggested in a comment here:
https://github.com/Corion/parent/commit/1e4a7036699d954497aa1494e52e55f495101583#commitcomment-10101684
Unfortunately I lack tuits for the 2 next weeks to write the full patch myself.


-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
A patch using Config::Perl::V (only as an optional test dependency) is now available:
https://github.com/Corion/parent/pull/3


-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
After some bad attempts by me, this was fixed in 0.231. Thanks!
Le 2015-03-19 20:33:08, CORION a écrit :
Show quoted text
> After some bad attempts by me, this was fixed in 0.231.

No, the fix is incomplete.

On perl 5.10.1 with PMC disabled, the test still fails. See the log below.

As I wrote above, the complete fix is in https://github.com/Corion/parent/pull/3 . It seems to have been automatically closed by GitHub, but without being really merged, not even reviewed.

-----------------------------------------------------------------------------

t/parent-pmc.t ..
1..3
not ok 1 - Block ran until the end

Show quoted text
#   Failed test 'Block ran until the end'
#   at t/parent-pmc.t line 41.
#          got: undef
#     expected: '1'
not ok 2 - No error

Show quoted text
#   Failed test 'No error'
#   at t/parent-pmc.t line 42.
#          got: 'Can't locate FileThatOnlyExistsAsPMC.pm in @INC (@INC contains: t/lib /home/jenkins/tmp/parent-0.232/lib /var/lib/jenkins/perl/perl-5.10.1/lib/5.10.1/x86_64-linux /var/lib/jenkins/perl/perl-5.10.1/lib/5.10.1 /var/lib/jenkins/perl/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux /var/lib/jenkins/perl/perl-5.10.1/lib/site_perl/5.10.1 .) at /home/jenkins/tmp/parent-0.232/lib/parent.pm line 20.
# BEGIN failed--compilation aborted at (eval 4) line 4.
# '
#     expected: ''
not ok 3 - FileThatOnlyExistsAsPMC->can('exclaim')

Show quoted text
#   Failed test 'FileThatOnlyExistsAsPMC->can('exclaim')'
#   at t/parent-pmc.t line 45.
#     FileThatOnlyExistsAsPMC->can('exclaim') failed
# Looks like you failed 3 tests of 3.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/3 subtests

Test Summary Report
-------------------
t/parent-pmc.t (Wstat: 768 Tests: 3 Failed: 3)
  Failed tests:  1-3
  Non-zero exit status: 3
Files=1, Tests=3,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.01 cusr  0.00 csys =  0.04 CPU)
Result: FAIL







-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
Should have been finally fixed in https://github.com/Corion/parent/pull/7