Subject: | PROJECT_PORT is broken |
When you've rewrited Catalyst::Script, you have forgotten about that.
Subject: | restart.patch |
Index: lib/Catalyst/Script/Server.pm
===================================================================
--- lib/Catalyst/Script/Server.pm (revision 12265)
+++ lib/Catalyst/Script/Server.pm (working copy)
@@ -8,6 +8,7 @@
use Moose;
use MooseX::Types::Common::Numeric qw/PositiveInt/;
use MooseX::Types::Moose qw/ArrayRef Str Bool Int RegexpRef/;
+use Catalyst::Utils;
use namespace::autoclean;
with 'Catalyst::ScriptRole';
@@ -45,7 +46,10 @@
cmd_aliases => 'p',
isa => PositiveInt,
is => 'ro',
- default => 3000,
+ default => sub {
+ my $self = shift;
+ $ENV{ Catalyst::Utils::class2env($self->application_name . '_PORT')}||3000
+ },
documentation => 'Specify a different listening port (to the default port 3000)',
);