X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FGLD.pm;h=d5a49dea6c5ef878374ae492e76e60a90d703a4b;hb=fa8dcd6975fc3bd35b2d3099f54c9677538ee1a7;hp=97298e09d712ce4b5248e33c0d3ca286986fa44e;hpb=0611312e34f4d0e3668a2c9894df36dc945ffe74;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/GLD.pm b/lib/MooseX/Getopt/GLD.pm index 97298e0..d5a49de 100644 --- a/lib/MooseX/Getopt/GLD.pm +++ b/lib/MooseX/Getopt/GLD.pm @@ -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. This parameter is an ArrayRef of strings, which are +L configuraion options (see "Configuring Getopt::Long" in +L) + =cut