Author: kwilliams
Date: Sun May 18 20:14:01 2008
New Revision: 11290
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build/ModuleInfo.pm
Log:
Add line number to warnings
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Sun May 18 20:14:01 2008
@@ -1,5 +1,9 @@
Revision history for Perl extension Module::Build.
+ - If there are multiple assignments to the $VERSION variable in
+ someone's module and this generates warnings, tell the user what
+ line number the problem is at.
+
- Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni]
- Fixed a couple bugs in how we quote arguments to external processes
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 Sun May 18 20:14:01 2008
@@ -185,6 +185,7 @@
my $pod_data = '';
while (defined( my $line = <$fh> )) {
+ my $line_num = $.;
chomp( $line );
next if $line =~ /^\s*#/;
@@ -239,7 +240,7 @@
# 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.
+ignoring subsequent declaration on line $line_num.
EOM
}
@@ -269,7 +270,7 @@
} else {
warn <<"EOM";
Package '$pkg' already declared with version '$vers{$pkg}'
-ignoring new version '$v'.
+ignoring new version '$v' on line $line_num.
EOM
}