From: Devin Austin Date: Fri, 6 Nov 2009 17:25:35 +0000 (+0000) Subject: unfucked test server options and made test pass f'real this time X-Git-Tag: 5.80014_02~51 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=bc6fa9fc20842a6cb58c8eabbae9efd7de9de691 unfucked test server options and made test pass f'real this time --- diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index e40da5e..816f9b4 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -36,9 +36,9 @@ has fork => ( documentation => 'Fork the server', ); -has listen => ( +has port => ( traits => [qw(Getopt)], - cmd_aliases => 'l', + cmd_aliases => 'p', isa => Int, is => 'ro', default => 3000, @@ -166,7 +166,7 @@ sub run { sub _application_args { my ($self) = shift; return ( - $self->listen, + $self->port, $self->host, { map { $_ => $self->$_ } qw/ diff --git a/t/author/optional_http-server.t b/t/author/optional_http-server.t index 1927442..692929c 100644 --- a/t/author/optional_http-server.t +++ b/t/author/optional_http-server.t @@ -32,7 +32,7 @@ rmtree '../t/tmp/TestApp/t' or die; # spawn the standalone HTTP server my $port = 30000 + int rand(1 + 10000); my @cmd = ($^X, "-I$FindBin::Bin/../../lib", - "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-l', $port ); + "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-p', $port ); my $pid = open3( undef, my $server, undef, @cmd) or die "Unable to spawn standalone HTTP server: $!";