untarded and added documentation
Devin Austin [Fri, 17 Jul 2009 00:52:56 +0000 (00:52 +0000)]
lib/Catalyst/Script/CGI.pm

index 1014854..609df55 100644 (file)
@@ -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;