Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Reporter CPAN distribution.

Report information
The Basics
Id: 30299
Status: resolved
Priority: 0/
Queue: CPAN-Reporter

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

Bug Information
Severity: Normal
Broken in: 1.04
Fixed in: 1.05



Subject: Low perl version not recognized
Module::Build emits this string: "$modname ($status{have}) is installed, but we need version $op $version" when the perl requirement is not fulfilled. However, CPAN::Reporter only checks for the regexp /ERROR: perl: Version .*? is installed, but we need version/ in _downgrade_known_causes. Regards, Slaven
Subject: Re: [rt.cpan.org #30299] Low perl version not recognized
Date: Sat, 27 Oct 2007 14:18:09 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
Show quoted text
> Module::Build emits this string: > > "$modname ($status{have}) is installed, but we need version $op $version" > > when the perl requirement is not fulfilled. However, CPAN::Reporter only > checks for the regexp > > /ERROR: perl: Version .*? is installed, but we need version/ > > in _downgrade_known_causes.
Is there an actual failure case for this? Module::Build emits that if 'perl' is given in the prereq list -- and CPAN::Reporter should be able to pick up there instead of having to scan the output. (e.g. see 't/dist/t-PrereqPerl-NOK' in the CPAN-Reporter tarball -- which is tested in t/53_test_report_na.t) David
On Sat Oct 27 14:18:30 2007, DAGOLDEN wrote: Show quoted text
> > Module::Build emits this string: > > > > "$modname ($status{have}) is installed, but we need version $op
$version" Show quoted text
> > > > when the perl requirement is not fulfilled. However, CPAN::Reporter only > > checks for the regexp > > > > /ERROR: perl: Version .*? is installed, but we need version/ > > > > in _downgrade_known_causes.
> > Is there an actual failure case for this? Module::Build emits that if > 'perl' is given in the prereq list -- and CPAN::Reporter should be > able to pick up there instead of having to scan the output. > > (e.g. see 't/dist/t-PrereqPerl-NOK' in the CPAN-Reporter tarball -- > which is tested in t/53_test_report_na.t) >
People often have our $VERSION = ... in their modules and in Build.PL the perl requirement is correctly declared. When I test with perl 5.00505, the low perl version is detected by Module::Build, then follows the distribution version detection which fails because of invalid syntax for perl 5.00505 and eventually the Build.PL dies. If you apply the attached patch to your test distribution, you can simulate this situation even with a modern perl. Regards, Slaven
#### Patch data follows #### diff -up '../../build/CPAN-Reporter-1.04-4YibMn/t/dist/t-PrereqPerl-NOK/lib/Bogus/Module.pm' 't/dist/t-PrereqPerl-NOK/lib/Bogus/Module.pm' Index: ./t/dist/t-PrereqPerl-NOK/lib/Bogus/Module.pm --- ./t/dist/t-PrereqPerl-NOK/lib/Bogus/Module.pm Fri Oct 26 13:01:16 2007 +++ ./t/dist/t-PrereqPerl-NOK/lib/Bogus/Module.pm Sat Oct 27 20:30:17 2007 @@ -1,6 +1,6 @@ package Bogus::Module; -$VERSION = "0.01"; +$VERSION = "0.01" using invalid (future) perl syntax; 1; # modules must be true #### End of Patch data ####
I think it's worse -- and it's really a Module::Build problem. I tried exactly the situation you describe -- version specified with "our" and tried with Module::Build 0.2808 and perl 5.00505. Build.PL dies and never even emits a perl version warning. I think the advice for Build.PL and version version has to be to put "use 5.006" at the top of the file and not depend on the "requires" line.
On Sat Oct 27 15:12:40 2007, DAGOLDEN wrote: Show quoted text
> I think it's worse -- and it's really a Module::Build problem. > > I tried exactly the situation you describe -- version specified with > "our" and tried with Module::Build 0.2808 and perl 5.00505. > > Build.PL dies and never even emits a perl version warning. > > I think the advice for Build.PL and version version has to be to put > "use 5.006" at the top of the file and not depend on the "requires" line. >
Try Module::Build 0.2808_01, as the perl requirement check is now done there earlier, before getting the distribution version. Here's how a typical "perl Build.PL" now looks like: $ perl5.00505 Build.PL Checking whether your kit is complete... Looks good Checking prerequisites... - ERROR: perl (5.00505) is installed, but we need version >= 5.6.0 ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Error evaling version line 'BEGIN { q# Hide from _packages_inside() #; package Module::Build::ModuleInfo::_version; no strict; local $VERSION; $VERSION=undef; $vsub = sub { our $VERSION = '0.02';; $VERSION }; }' in /mnt/i386/usr/local/src/CPAN/build/accessors-0.02-07xO5E/lib/accessors.pm: Can't modify subroutine entry in scalar assignment at (eval 16) line 8, at EOF BEGIN not safe after errors--compilation aborted at (eval 16) line 11, <GEN1> chunk 27. failed to build version sub for /mnt/i386/usr/local/src/CPAN/build/accessors-0.02-07xO5E/lib/accessors.pm at /usr/perl5.005_05/lib/site_perl/5.005/Module/Build/ModuleInfo.pm line 312, <GEN1> chunk 27. Exitcode 2
That's good to see, but it's not backwards compatible. I think the answer is going to be to push authors to add an explicit perl version requirement. (sigh) David
On Sat Oct 27 15:26:52 2007, DAGOLDEN wrote: Show quoted text
> That's good to see, but it's not backwards compatible. I think the > answer is going to be to push authors to add an explicit perl version > requirement. (sigh) >
I don't think we should put any additional burden to the CPAN authors, especially if they already specify the minimal requirements. It seems to me that at least this problem is solvable by the test and/or build tools. Slaven
Subject: Re: [rt.cpan.org #30299] Low perl version not recognized
Date: Sat, 27 Oct 2007 16:29:47 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On 10/27/07, Slaven_Rezic via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> I don't think we should put any additional burden to the CPAN authors, > especially if they already specify the minimal requirements. It seems to > me that at least this problem is solvable by the test and/or build tools.
That's really not the philosophy I've had with CPAN::Reporter. I expect authors to specify their needs in a standardized way. If they don't want to do so, they are free to ignore or delete FAIL reports -- these do not interfere with module installation in any way so don't "break" things for end-users. Providing CPAN Testers reports is a service to authors, so it's not unreasonable to expect something of them in return if they want to get the most out of the service. I'm explicitly avoiding making a commitment that CPAN::Reporter will parse out specific magic text in the failure messages of anything that is currently (or in the future) part of the toolchain. I only do it where I absolutely have to or to be backwards compatible with CPAN Testers history (e.g. "OS unsupported").
On Sat Oct 27 16:30:03 2007, DAGOLDEN wrote: Show quoted text
> On 10/27/07, Slaven_Rezic via RT <bug-CPAN-Reporter@rt.cpan.org> wrote:
> > I don't think we should put any additional burden to the CPAN authors, > > especially if they already specify the minimal requirements. It seems to > > me that at least this problem is solvable by the test and/or build
tools. Show quoted text
> > That's really not the philosophy I've had with CPAN::Reporter. I > expect authors to specify their needs in a standardized way.
Well, there are three build tools in the perl world, two of them "official" by their existance in the perl core (MakeMaker, Module::Build) and the third one quite popular (Module::Install). So I think CPAN::Reporter should deal with their views of specifying a minimal perl version. Only MakeMaker does it by "require X.YYYY", the other two have their own "perl_requires" schemes. One solution could be two make those tools behaving exactly the same like MakeMaker when encountering a low perl version, but this seems also to be problematic (as Module::Install is usually bundled with the distributions and therefore the test tool must deal with Module::Install behaviour as is). But I am still in favour of adding just the one missing regexp to CPAN::Reporter... Slaven
Subject: Re: [rt.cpan.org #30299] Low perl version not recognized
Date: Sun, 28 Oct 2007 07:19:13 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On 10/27/07, Slaven_Rezic via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> But I am still in favour of adding just the one missing regexp to > CPAN::Reporter...
So am I -- but that only fixes things for 0.2808_01 and forward. David
Subject: Re: [rt.cpan.org #30299] Low perl version not recognized
Date: 28 Oct 2007 13:19:30 +0100
To: bug-CPAN-Reporter [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
" via RT" <bug-CPAN-Reporter@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=30299 > > > On 10/27/07, Slaven_Rezic via RT <bug-CPAN-Reporter@rt.cpan.org> wrote:
> > But I am still in favour of adding just the one missing regexp to > > CPAN::Reporter...
> > So am I -- but that only fixes things for 0.2808_01 and forward.
I think you can add a dependency on Module::Build 0.2809 once it is released. As for now, this is really only an issue for perl 5.005 smokers, and I think there's only one around :-) Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de babybike - routeplanner for cyclists in Berlin handheld (e.g. Compaq iPAQ with Linux) version of bbbike http://bbbike.sourceforge.net
Subject: Re: [rt.cpan.org #30299] Low perl version not recognized
Date: Sun, 28 Oct 2007 09:08:50 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On 10/28/07, slaven@rezic.de via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
> I think you can add a dependency on Module::Build 0.2809 once it is > released. As for now, this is really only an issue for perl 5.005 > smokers, and I think there's only one around :-)
That's a thought. I've avoided requiring it, since there have reportedly been issue with Module::Build upgrading itself. But I did wind up requiring a newer version of EU::MM for a lot of bug fixes and maybe it'll be time to add M::B. But I'm hesitant to force someone to have a working M::B in order to use CPAN::Reporter. David
Just FYI: I am currently using the patch http://www.cpan.org/authors/id/S/SR/SREZIC/patches/CPAN-Reporter-1.04-SREZIC-01.patch in my 5.00505 version of CPAN::Reporter. Regards, Slaven
Fixed in 1.05