-? is also accepted as a help option
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt / GLD.pm
index 97298e0..d5a49de 100644 (file)
@@ -22,7 +22,7 @@ role {
         traits => ['NoGetopt'],
     );
 
-    # captures the options: --help --usage --?
+    # captures the options: --help --usage --? -?
     has help_flag => (
         is => 'ro', isa => 'Bool',
         traits => ['Getopt'],
@@ -90,6 +90,10 @@ role {
 
   with 'MooseX::Getopt::GLD';
 
+  # or
+
+  with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through', ... ] };
+
   has 'out' => (is => 'rw', isa => 'Str', required => 1);
   has 'in'  => (is => 'rw', isa => 'Str', required => 1);
 
@@ -106,4 +110,11 @@ role {
   ## on the command line
   % perl my_app_script.pl -in file.input -out file.dump
 
+=head1 OPTIONS
+
+This role is a parameterized role. It accepts one configuration parameter,
+C<getopt_conf>. This parameter is an ArrayRef of strings, which are
+L<Getopt::Long> configuraion options (see "Configuring Getopt::Long" in
+L<Getopt::Long>)
+
 =cut