fixed Catalyst::Script::Server so app doesn't have to be a cmd line opt
Devin Austin [Sat, 11 Jul 2009 00:06:53 +0000 (00:06 +0000)]
lib/Catalyst/Script/Server.pm
t/TestApp/script/testapp_server.pl

index 1d8c7cf..05dd814 100644 (file)
@@ -75,11 +75,13 @@ has background => (
 
 
 ## broken now, WHY?!
-has app => ( 
-    #traits => [qw(NoGetopt)],
+has _app => ( 
+    reader   => 'app', 
+    init_arg => 'app',
+    traits => [qw(NoGetopt)],
     isa => 'Str',    
     is => 'ro', 
-    required => 1,
+    required => 0,
 ); 
 
 has restart => (
@@ -121,6 +123,7 @@ sub run {
     
     pod2usage() if $self->help;
     my $app = $self->app;
+    warn "App is $app";
     Class::MOP::load_class($app);
     $app->run(
         $self->listen, $self->host,
index 51c3011..8069e7a 100755 (executable)
@@ -10,4 +10,4 @@ BEGIN {
 ## because this is a test
 use lib "$Bin/../../../lib";
 use Catalyst::ScriptRunner;
-Catalyst::ScriptRunner->run('Catalyst','Server');
+Catalyst::ScriptRunner->run('TestApp','Server');