Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



Subject: Lack of $VERSION declaration in M::B::Base causes spurious failures
Hi, We received this bug report for CPANPLUS, that it fails loading Module::Build at times: https://rt.cpan.org/Ticket/Display.html?id=13863 The problem was traced by the user to this section of code: I found it in .../.cpanplus/5.9.2/build/Module-Build- 0.2611/lib/Module/Build/Base.pm *UNIVERSAL::VERSION = $old_version; EU::MM, Module::Installed and CPANPLUS share a regex that tries to parse the version number from a module. Since there's no $VERSION declaration in the file, this the segment that is found by this shared regex to be the version declaration for the file -- which is of course incorrect, and meddles with UNIVERSAL::VERSION when eval'd (which all the above mentioned modules do with the segment of code they find). The fix seems simple: add a $VERSION statement to M::B::Base.. it could be as simple as: $VERSION = $Module::Build::VERSION; Thanks
I think that instead of adding a $VERSION, I'll change the offending line so that it's not picked up by the regex anymore. Something like: *{UNIVERSAL::VERSION} = $old_version; -Ken