X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCGI.pm;h=4608a7cd30c73f46e7102b753c6bc3d46e46b3b9;hb=f4dc8d2fe3a7882572f540b1907b3153a20f909e;hp=101485468fdc6e0273b66873712b2f246b5b3325;hpb=57dc50b07c8e492f4eb4a0e946b38725fbdb5eb8;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index 1014854..4608a7c 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -6,12 +6,26 @@ use FindBin qw/$Bin/; use lib "$Bin/../lib"; use Pod::Usage; use Moose; -use namespace::autoclean -except => [ qw(meta) ]; +use namespace::autoclean; with 'MooseX::Getopt'; -has app => ( isa => 'Str', is => 'ro', required => 1 ); -has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } ); +has _app => ( + reader => 'app', + init_arg => 'app', + traits => [qw(NoGetopt)], + isa => 'Str', + is => 'ro', +); + +has help => ( + traits => [qw(Getopt)], + cmd_aliases => 'h', + isa => 'Bool', + is => 'ro', + documentation => qq{ display this help and exits }, +); + sub run { my $self = shift;