Re: [Module::Build] Buglet: Creative use of $VERSION confuses M::B
Status: Beta
Brought to you by:
kwilliams
|
From: John P. <jpe...@ro...> - 2006-03-27 14:38:34
|
Johan Vromans wrote:
> The following sequence of statements (copied from Config::IniFiles
> 2.38) confuses the version number detection:
>
> package Config::IniFiles;
> $Config::IniFiles::VERSION = (qw($Revision: 2.38 $))[1];
> require 5.004;
> use strict;
> # Eliminate annoying warnings
> if ($^W) {
> $Config::IniFiles::VERSION = $Config::IniFiles::VERSION;
> }
>
> This causes the following message:
>
> Package 'Config::IniFiles' already declared with version '2.38'
> ignoring new version ''.
If that second section was reformatted to:
if ($^W) {
$Config::IniFiles::VERSION =
$Config::IniFiles::VERSION;
}
it wouldn't match the regex and hence not issue the warning. You should
let the author know...
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5748
|