X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FGLD.pm;h=5edb9375df3dc85f9a32785aeccab16f7d892f2c;hb=81b19ed83c9e345f960ccefbcd639dd0e3c2de06;hp=b2ccafecaf6398e35a45df716b3ae28e47a8436d;hpb=2557b52647dda5b9e090b324d950d4a55db74bae;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/GLD.pm b/lib/MooseX/Getopt/GLD.pm index b2ccafe..5edb937 100644 --- a/lib/MooseX/Getopt/GLD.pm +++ b/lib/MooseX/Getopt/GLD.pm @@ -7,6 +7,20 @@ use Getopt::Long::Descriptive 0.081; with 'MooseX::Getopt::Basic'; +has usage => ( + is => 'rw', isa => 'Getopt::Long::Descriptive::Usage', + traits => ['NoGetopt'], +); + +# captures the options: --help --usage --? +has help_flag => ( + is => 'ro', isa => 'Bool', + traits => ['Getopt'], + cmd_flag => 'help', + cmd_aliases => [ qw(usage ?) ], + documentation => 'Prints this usage information.', +); + around _getopt_spec => sub { shift; shift->_gld_spec(@_);