Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Meta-YAML CPAN distribution.

Report information
The Basics
Id: 74721
Status: resolved
Priority: 0/
Queue: CPAN-Meta-YAML

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Regain 5.8.5 compatibility
Analysis diagnoses significant correlation of fails with an installed Scalar::Util of 1.13 or 1.14. http://analysis.cpantesters.org/reports_by_field?distv=CPAN-Meta-YAML-0.005;field=mod%3AScalar%3A%3AUtil;order=2na There are no tests on cpantesters with older Scalar::Util and I have no access to older perls at the moment. My two patches below extend backwards compatibility to at least 5.8.5. Maybe not far enough, 5.8.5 is all I have at the moment. We have cpantesters to find out more. The Makefile.PL has an unneeded requirement of MakeMaker 6.3 whereas I see no problem with the MakeMaker 6.17 that comes with 5.8.5. Just a warning that License is not a known MAkeMAker parameter but this does not trigger problems. I also see the configure_requires option as superfluous that does not gain anything for anybody. So my first patch suggest --- Makefile.PL~ 2012-02-06 11:19:09.000000000 +0100 +++ Makefile.PL 2012-02-06 11:50:27.000000000 +0100 @@ -4,7 +4,7 @@ use 5.004; -use ExtUtils::MakeMaker 6.30; +use ExtUtils::MakeMaker 6.17; @@ -17,9 +17,6 @@ "Test::More" => 0, "vars" => 0 }, - "CONFIGURE_REQUIRES" => { - "ExtUtils::MakeMaker" => "6.30" - }, "DISTNAME" => "CPAN-Meta-YAML", "EXE_FILES" => [], "LICENSE" => "perl", The other change is trivial. I have two alternative patches to suggest. The first one is minimal but I had to do some digging for it. The Changes file of Scalar::Util dates the addition of refaddr() short before 1.09 was released. So unless there is a reason to consider some versions of refaddr broken, the version number that triggers the refaddr emulation must be lowered. --- lib/CPAN/Meta/YAML.pm~ 2012-02-06 10:58:39.000000000 +0100 +++ lib/CPAN/Meta/YAML.pm 2012-02-06 11:02:17.000000000 +0100 @@ -614,7 +614,7 @@ eval { require Scalar::Util; }; - if ( $@ or $Scalar::Util::VERSION < 1.18 ) { + if ( $@ or $Scalar::Util::VERSION < 1.09 ) { eval <<'END_PERL' if $@; # Scalar::Util failed to load or too old sub refaddr { The alternative patch leaves the choice to perl's own introspection such that the digging in history files can be skipped. I consider it the superior patch: --- lib/CPAN/Meta/YAML.pm~ 2012-02-06 10:58:39.000000000 +0100 +++ lib/CPAN/Meta/YAML.pm 2012-02-06 11:42:04.000000000 +0100 @@ -614,7 +614,7 @@ eval { require Scalar::Util; }; - if ( $@ or $Scalar::Util::VERSION < 1.18 ) { + if ( $@ or !defined &Scalar::Util::refaddr ) { eval <<'END_PERL' if $@; # Scalar::Util failed to load or too old sub refaddr { I would be glad to see this applied, what do you think? Thanks!
Subject: Re: [rt.cpan.org #74721] Regain 5.8.5 compatibility
Date: Mon, 6 Feb 2012 10:30:00 -0500
To: bug-CPAN-Meta-YAML [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
Show quoted text
> The Makefile.PL has an unneeded requirement of MakeMaker 6.3 whereas I > see no problem with the MakeMaker 6.17 that comes with 5.8.5. Just a > warning that License is not a known MAkeMAker parameter but this does > not trigger problems. I also see the configure_requires option as > superfluous that does not gain anything for anybody.
I'm concerned about the large number of bugs fixed between 6.17 and 6.30. INSTALLBASE wasn't available until 6.26. PL_FILES look buggy until 6.30. While CPAN::Meta itself doesn't absolutely need 6.30, I don't think it's bad to force people to upgrade, either. Right now it uses the default Dist::Zilla set minimum. Maybe Ricardo can comment on the rationale. If we don't think it makes sense, then I'll work with Ricardo to make it configurable instead of hard-coded and we can set it back for CPAN::Meta. More generally, I'm not very concerned about making CPAN::Meta work on old perls because it's an optional tool anyway. I'll look into the Scalar::Utils stuff as well and let you know what I find. -- David
Subject: Re: [rt.cpan.org #74721] Regain 5.8.5 compatibility
Date: Mon, 6 Feb 2012 10:34:03 -0500
To: bug-CPAN-Meta-YAML [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Mon, Feb 6, 2012 at 10:30 AM, David Golden <dagolden@cpan.org> wrote: Show quoted text
> I'll look into the Scalar::Utils stuff as well and let you know what I find.
Oops. I just realized this was a CPAN-Meta-YAML ticket, not CPAN-Meta. The Scalar::Utils stuff comes straight from YAML::Tiny, so that request should go there for Adam Kennedy to consider what the real minimum is. David
Subject: Re: [rt.cpan.org #74721] Regain 5.8.5 compatibility
Date: Mon, 6 Feb 2012 10:36:38 -0500
To: bug-CPAN-Meta-YAML [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Mon, Feb 6, 2012 at 10:34 AM, David Golden <dagolden@cpan.org> wrote: Show quoted text
> The Scalar::Utils stuff comes straight from YAML::Tiny, so that > request should go there for Adam Kennedy to consider what the real > minimum is.
This looks suspicious in the Scalar::Util change file: 1.18 -- Fri Nov 25 09:30:29 CST 2005 Bug Fixes * Fix pure-perl version of refaddr to avoid blessing an un-blessed reference -- David
Show quoted text
> Bug Fixes > * Fix pure-perl version of refaddr to avoid blessing an un-blessed > reference
Thanks for the quote, I missed that. So there must be a reason for the hard coded "1.18" and a different reason why YAML::Tiny has all the matrix green and C:M:Y has so many fails. Offhand I don't understand it. I'll try to find out ASAP. BTW, thanks for the 0.006 release!
From: Sam
On Mon Feb 06 10:30:57 2012, DAGOLDEN wrote: Show quoted text
> > The Makefile.PL has an unneeded requirement of MakeMaker 6.3
whereas I Show quoted text
> > see no problem with the MakeMaker 6.17 that comes with 5.8.5. Just a > > warning that License is not a known MAkeMAker parameter but this
does Show quoted text
> > not trigger problems. I also see the configure_requires option as > > superfluous that does not gain anything for anybody.
> > I'm concerned about the large number of bugs fixed between 6.17 and > 6.30. INSTALLBASE wasn't available until 6.26. PL_FILES look buggy > until 6.30. While CPAN::Meta itself doesn't absolutely need 6.30, I > don't think it's bad to force people to upgrade, either. > > Right now it uses the default Dist::Zilla set minimum. Maybe Ricardo > can comment on the rationale. If we don't think it makes sense, then > I'll work with Ricardo to make it configurable instead of hard-coded > and we can set it back for CPAN::Meta. > > More generally, I'm not very concerned about making CPAN::Meta work on > old perls because it's an optional tool anyway. > > I'll look into the Scalar::Utils stuff as well and let you know what
I find. Show quoted text
> > -- David
Hi David, I vote for this patch. We’re restricted to Perl 5.8.5, unfortunately. Also, in 00compile.t, if you double-quote the $^X, the test will work on Windows for Perl installed under c:\Program Files: like( qx{ "$^X" -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) Thanks, Sam
Released 0.008 based on YAML::Tiny 1.51, which should solve this issue.