cleaned up
Devin Austin [Fri, 17 Jul 2009 01:04:12 +0000 (01:04 +0000)]
lib/Catalyst/Script/FastCGI.pm
lib/Catalyst/Script/Test.pm

index a00cd5d..48b7b5f 100644 (file)
@@ -9,15 +9,21 @@ use namespace::autoclean;
 
 with 'MooseX::Getopt';
 
-has help        => ( isa => 'Bool',   is => 'ro', required => 0, default => sub { 0 } );
+has help        => ( isa => 'Bool',   is => 'ro', required => 0 );
 has listen      => ( isa => 'Int',    is => 'ro', required => 1 );
 has pidfile     => ( isa => 'Str',    is => 'ro', required => 0 );
-has daemon      => ( isa => 'Bool',   is => 'ro', required => 0, default => sub { 0 } );
+has daemon      => ( isa => 'Bool',   is => 'ro', required => 0 );
 has manager     => ( isa => 'Str',    is => 'ro', required => 0 );
 has keep_stderr => ( isa => 'Bool',   is => 'ro', required => 0 );
 has nproc       => ( isa => 'Int',    is => 'ro', required => 0 );
-has detach      => ( isa => 'Bool',   is => 'ro', required => 0, default => sub { 0 } );
-has app         => ( isa => 'Str',    is => 'ro', required => 1 );
+has detach      => ( isa => 'Bool',   is => 'ro', required => 0 );
+has _app => (
+    reader   => 'app',
+    init_arg => 'app',
+    traits => [qw(NoGetopt)],
+    isa => 'Str',
+    is => 'ro',
+);
 
 sub run {
     my $self = shift;
index ed4ad64..ae8c352 100644 (file)
@@ -4,10 +4,23 @@ use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 with 'MooseX::Getopt';
-use namespace::autoclean -except => [ qw(meta) ];
+use namespace::autoclean;
 
-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 {