Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 59593
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: ansgar [...] 43-1.org
Cc:
AdminCc:

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



Subject: Fails if $VERSION is invalid, even when no specific version required
Date: Wed, 21 Jul 2010 18:42:03 +0900
To: bug-Module-Build [...] rt.cpan.org
From: Ansgar Burchardt <ansgar [...] 43-1.org>
Hi, Module::Build seems to make the assumption that $VERSION assignments follow the conventions used on CPAN, but some module do not follow these. For example the following Build.PL fails: use Module::Build; my $build = Module::Build->new( module_name => "Foo", requires => { "SVN::Core" => 0, }, ); with this message: Version '..' from /usr/lib/perl5/SVN/Core.pm does not appear to be valid: BEGIN { q# Hide from _packages_inside() #; package Module::Build::ModuleInfo::_version::p1; use Module::Build::Version; no strict; local $SVN::Core::VERSION; $SVN::Core::VERSION=undef; $vsub = sub { $SVN::Core::VERSION = "$SVN::Core::VER_MAJOR.$SVN::Core::VER_MINOR.$SVN::Core::VER_MICRO";; $SVN::Core::VERSION }; } The fatal error was: Invalid version format (fractional part required) at [...]/Module/Build/ModuleInfo.pm line 348, <GEN0> line 7. I am using Module::Build 0.3607, the same error (with a less verbose error message) also happens with 0.340201 (as included in perl 5.10.1). A workaround is to check the SVN::Core dependency by hand (SVN::Web does this). But I think at least for a dependency that does not specify any version, Module::Build should not fail if $VERSION seems to be invalid. Of course it would also be good if SVN::Core follows the conventions as well. Regards, Ansgar
Subject: Re: [rt.cpan.org #59593] Fails if $VERSION is invalid, even when no specific version required
Date: Wed, 21 Jul 2010 07:00:55 -0700
To: bug-Module-Build [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Wed, Jul 21, 2010 at 2:42 AM, Ansgar Burchardt via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> But I think at least for a dependency that does not specify any > version, Module::Build should not fail if $VERSION seems to be invalid.
I agree. If you want to write a patch to that effect, I'll integrate it into the M::B repository. C.f. http://github.com/dagolden/module-build/ Otherwise, I'm supportive, but personally don't have time to address this bug at the moment, but perhaps other maintainers will. -- David
Actually, this was fairly straightforward and I fixed it while working on something else. It will be in the next release of Module::Build
Now that there has been a stable Module::Build release, I'm marking this "patched" issue as "resolved".