Author: kwilliams
Date: Mon Nov 27 19:26:43 2006
New Revision: 8113
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build/ModuleInfo.pm
Log:
Silence a warning in ModuleInfo when the user is using $VERSION = eval $VERSION
idiom
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Mon Nov 27 19:26:43 2006
@@ -2,6 +2,9 @@
0.2806
+ - Silence a warning in M::B::ModuleInfo that happens when the author
+ is using the "$VERSION = eval $VERSION" idiom.
+
- When running the 'testcover' action, do "cover --delete" if any of
the test files have changed (we already did so if any of the code
under test has changed). [Suggested by Chris Dolan, RT #23584]
Modified: Module-Build/trunk/lib/Module/Build/ModuleInfo.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/ModuleInfo.pm (original)
+++ Module-Build/trunk/lib/Module/Build/ModuleInfo.pm Mon Nov 27 19:26:43 2006
@@ -225,7 +225,10 @@
$vers{$vers_pkg} =
$self->_evaluate_version_line( $vers_sig, $vers_fullname, $line );
} else {
- warn <<"EOM";
+ # Warn unless the user is using the "$VERSION = eval
+ # $VERSION" idiom (though there are probably other idioms
+ # that we should watch out for...)
+ warn <<"EOM" unless $line =~ /=\s*eval/;
Package '$vers_pkg' already declared with version '$vers{$vers_pkg}',
ignoring subsequent declaration.
EOM