Somewhat fix the scripts and tests
[catagits/Catalyst-Devel.git] / share / script / myapp_server.pl.tt
index f51d48d..9be7f74 100644 (file)
@@ -1,34 +1,7 @@
-package [% appprefix %]::Script::Server;
-
-use Catalyst::Engine::HTTP;
-use [% appprefix %];
-use Moose;
-
-with 'MooseX::GetOpt';
-
-has argv => ( isa => 'ArrayRef', is => 'ro', required => 1 );
-has [qw/ fork background keepalive /] => ( isa => 'Bool', is => 'ro', required => 1, default => 0 );
-has pidfile => ( isa => 'Str', required => 0, is => 'ro' );
-
-sub run {
-    my $self = shift;
-    [% appprefix %]->run(
-        $port, $host,
-        {
-            argv       => $self->argv,
-            'fork'     => $self->fork,
-            keepalive  => $self->keepalive,
-            background => $self->background,
-            pidfile    => $self->pidfile,
-        }
-    );
-}
-
-
-
-__PACKAGE__->new_with_options->run;
-
+[% startperl %]
 
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('[% name %]', 'Server');
 
 1;