X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCGI.pm;h=609df55493a5d29ea217ff94a2e271d6359a2772;hp=101485468fdc6e0273b66873712b2f246b5b3325;hb=8a289b5f348fedc6761768e8c91b34b5ca05afeb;hpb=1efc6c6b51bccdfb5574b79abfa6904d2c6869d7 diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index 1014854..609df55 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -10,8 +10,22 @@ use namespace::autoclean -except => [ qw(meta) ]; 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;