Subject: | Silently ignores unexpected/unparseable arguments |
Hi,
This is a followup to Debian bug report #472101
(http://bugs.debian.org/472101). Basically, our user complains that, if
a module is created and extra, unparseable arguments are given to
module-starter, they are silently ignored. And it is easy to forget to
escape or quote the whitespace between the author's given and family names.
The patch is trivial:
Index: libmodule-starter-perl/lib/Module/Starter/App.pm
===================================================================
--- libmodule-starter-perl.orig/lib/Module/Starter/App.pm 2008-03-23
14:54:08.000000000 -0600
+++ libmodule-starter-perl/lib/Module/Starter/App.pm 2008-03-23
14:56:55.000000000 -0600
@@ -74,6 +74,7 @@
mb => sub { push @{$config{builder}}, 'Module::Build' },
mi => sub { push @{$config{builder}}, 'Module::Install' },
+
'author=s' => \$config{author},
'email=s' => \$config{email},
'license=s' => \$config{license},
@@ -86,6 +87,11 @@
help => sub { pod2usage(1); },
) or pod2usage(2);
+ if (@ARGV) {
+ pod2usage(-msg => "Unparseable arguments received: " . join(',
', @ARGV),
+ -exitval => 2);
+ }
+
$config{class} ||= 'Module::Starter';
$config{builder} = ['ExtUtils::MakeMaker'] unless @{$config{builder}};