Subject: | DIeing on Invalid Options Not Documented |
Please consider the attached documentation patch.
This mentions that describe_options takes care of checking the options
for validity and die-ing with an appropriate usage message if they're
invalid -- behaviour which I couldn't otherwise see documented (and is a
change from Getopt::Long).
Thanks.
Subject: | document_die.patch |
--- /usr/local/share/perl/5.12.4/Getopt/Long/Descriptive.pm 2011-04-22 01:43:13.000000000 +0100
+++ ./Descriptive.pm 2011-08-24 13:56:56.345719259 +0100
@@ -383,8 +383,10 @@
my ($opt, $usage) = describe_options($usage_desc, @opt_spec, \%arg);
-This routine inspects C<@ARGV> returns the options given and a object
-for generating usage messages.
+This routine inspects C<@ARGV> for options that match the supplied spec. If all
+the options are valid then it returns the options given and an object for
+generating usage messages; if not then it dies with an explanation of what was
+wrong and a usage message.
The C<$opt> object will be a dynamically-generated subclass of
L<Getopt::Long::Descriptive::Opts>. In brief, each of the options in