[Catalyst-commits] r10654 - in
Catalyst-Runtime/5.80/branches/better_scripts: lib/Catalyst/Script t
dhoss at dev.catalyst.perl.org
dhoss at dev.catalyst.perl.org
Thu Jun 25 02:15:19 GMT 2009
Author: dhoss
Date: 2009-06-25 02:15:18 +0000 (Thu, 25 Jun 2009)
New Revision: 10654
Modified:
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm
Catalyst-Runtime/5.80/branches/better_scripts/t/start_dev_server.t
Log:
poked at t/start_dev_server.t
corrected Server to start with HTTP not CGI
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm 2009-06-25 02:03:00 UTC (rev 10653)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Script/Server.pm 2009-06-25 02:15:18 UTC (rev 10654)
@@ -10,14 +10,18 @@
with 'MooseX::Getopt';
-has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
-has host => ( isa => 'Str', is => 'ro', required => 0 );
-has fork => ( isa => 'Bool', is => 'ro', required => 0 );
-has listen => ( isa => 'Int', is => 'ro', required => 0, default => sub{ 3000 } );
-has pidfile => ( isa => 'Str', is => 'ro', required => 0 );
-has keepalive => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
-has background => ( isa => 'Bool', is => 'ro', required => 0 );
-has app => ( isa => 'Str', is => 'ro', required => 1 );
+has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
+has host => ( isa => 'Str', is => 'ro', required => 0, default => sub { "localhost" } );
+has fork => ( isa => 'Bool', is => 'ro', required => 0 );
+has listen => ( isa => 'Int', is => 'ro', required => 0, default => sub{ 3000 } );
+has pidfile => ( isa => 'Str', is => 'ro', required => 0 );
+has keepalive => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
+has background => ( isa => 'Bool', is => 'ro', required => 0 );
+has app => ( isa => 'Str', is => 'ro', required => 1 );
+has restart => ( isa => 'Bool', is => 'ro', required => 0 );
+has restart_delay => ( isa => 'Int', is => 'ro', required => 0 );
+has restart_regex => ( isa => 'Str', is => 'ro', required => 0 );
+has follow_symlinks => ( isa => 'Bool', is => 'ro', required => 0 );
my @argv = @ARGV;
@@ -34,6 +38,12 @@
keepalive => $self->keepalive,
background => $self->background,
pidfile => $self->pidfile,
+ keepalive => $self->keepalive,
+ restart => $self->restart,
+ restart_delay => $self->restart_delay,
+ restart_regex => qr/$self->restart_regex/,
+ restart_directory => $self->restart_directory,
+ follow_symlinks => $self->follow_symlinks,
}
);
Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/start_dev_server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/start_dev_server.t 2009-06-25 02:03:00 UTC (rev 10653)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/start_dev_server.t 2009-06-25 02:15:18 UTC (rev 10654)
@@ -7,6 +7,8 @@
use File::Spec;
use lib "$Bin/TestApp/lib";
use TestApp;
+use Catalyst::Test 'TestApp', {default_host => 'default.com'};
+use Catalyst::Request;
use Test::WWW::Mechanize;
BEGIN {
$ENV{CATALYST_ENGINE} ||= 'HTTP';
@@ -23,7 +25,7 @@
die "fork() error, cannot continue" unless defined($childpid);
if ($childpid == 0) {
- system("$^X $server_path -p $port > $devnull 2>&1");
+ system("$^X $server_path --listen $port > $devnull 2>&1");
exit; # just for sure; we should never got here
}
More information about the Catalyst-commits
mailing list