From: Florian Ragwitz Date: Sun, 29 Nov 2009 14:00:38 +0000 (+0000) Subject: Port numbers need to be > 0. X-Git-Tag: 5.80014_02~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=883c37ef13bcc69f7523a2a2e785795fd2b6f2aa Port numbers need to be > 0. --- diff --git a/Makefile.PL b/Makefile.PL index c81c121..4ec0a51 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -50,6 +50,7 @@ requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness requires 'MRO::Compat'; requires 'MooseX::Getopt' => '0.25'; requires 'MooseX::Types'; +requires 'MooseX::Types::Common::Numeric'; requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace test_requires 'Class::Data::Inheritable'; diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index 665d242..df78134 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -6,6 +6,7 @@ BEGIN { } use Moose; +use MooseX::Types::Common::Numeric qw/PositiveInt/; use MooseX::Types::Moose qw/ArrayRef Str Bool Int RegexpRef/; use namespace::autoclean; @@ -42,7 +43,7 @@ has fork => ( has port => ( traits => [qw(Getopt)], cmd_aliases => 'p', - isa => Int, + isa => PositiveInt, is => 'ro', default => 3000, documentation => 'Specify a different listening port (to the default port 3000)',