[Catalyst-commits] r10718 - in
Catalyst-Devel/1.00/branches/helper_refactor/share: script t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Jun 28 23:11:43 GMT 2009
Author: t0m
Date: 2009-06-28 23:11:42 +0000 (Sun, 28 Jun 2009)
New Revision: 10718
Modified:
Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_cgi.pl.tt
Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_fastcgi.pl.tt
Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_server.pl.tt
Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_test.pl.tt
Catalyst-Devel/1.00/branches/helper_refactor/share/t/01app.t.tt
Catalyst-Devel/1.00/branches/helper_refactor/share/t/comptest.tt
Log:
Somewhat fix the scripts and tests
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_cgi.pl.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_cgi.pl.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_cgi.pl.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -1,7 +1,7 @@
[% startperl %]
use Catalyst::ScriptRunner;
-Catalyst::ScriptRunner->run('Catalyst','CGI');
+Catalyst::ScriptRunner->run('[% name %]', 'CGI');
1;
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_fastcgi.pl.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_fastcgi.pl.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_fastcgi.pl.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -1,7 +1,7 @@
[% startperl %]
use Catalyst::ScriptRunner;
-Catalyst::ScriptRunner->run('Catalyst','FastCGI');
+Catalyst::ScriptRunner->run('[% name %]','FastCGI');
1;
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_server.pl.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_server.pl.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_server.pl.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -1,35 +1,8 @@
-package [% appprefix %]::Script::Server;
+[% startperl %]
-use Catalyst::Engine::HTTP;
-use [% appprefix %];
-use Moose;
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('[% name %]', 'Server');
-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;
-
-
-
1;
=head1 NAME
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_test.pl.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_test.pl.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_test.pl.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -1,7 +1,7 @@
[% startperl %]
use Catalyst::ScriptRunner;
-Catalyst::ScriptRunner->run('Catalyst','Test');
+Catalyst::ScriptRunner->run('[% name %]','Test');
1;
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/t/01app.t.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/t/01app.t.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/t/01app.t.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -3,6 +3,6 @@
use warnings;
use Test::More tests => 2;
-BEGIN { use_ok 'Catalyst::Test', '[% app %]' }
+BEGIN { use_ok 'Catalyst::Test', '[% name %]' }
ok( request('/')->is_success, 'Request should succeed' );
Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/t/comptest.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/t/comptest.tt 2009-06-28 22:42:23 UTC (rev 10717)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/t/comptest.tt 2009-06-28 23:11:42 UTC (rev 10718)
@@ -2,7 +2,7 @@
use warnings;
[% IF long_type == 'Controller' %][% IF mech %]use Test::More;
-eval "use Test::WWW::Mechanize::Catalyst '[% app %]'";
+eval "use Test::WWW::Mechanize::Catalyst '[% name %]'";
plan $@
? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' )
: ( tests => 2 );
@@ -12,7 +12,7 @@
$mech->get_ok( 'http://localhost[% uri %]' );
[% ELSE %]use Test::More tests => 3;
-BEGIN { use_ok 'Catalyst::Test', '[% app %]' }
+BEGIN { use_ok 'Catalyst::Test', '[% name %]' }
BEGIN { use_ok '[% class %]' }
ok( request('[% uri %]')->is_success, 'Request should succeed' );
More information about the Catalyst-commits
mailing list