Beat the args handling in Script::FastCGI into working condition.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Server.pm
index 22ed5b6..315fa54 100644 (file)
@@ -9,8 +9,6 @@ sub _plack_engine_name { 'Standalone' }
 
 with 'Catalyst::ScriptRole';
 
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
-
 has debug => (
     traits        => [qw(Getopt)],
     cmd_aliases   => 'd',
@@ -186,6 +184,15 @@ sub _plack_loader_args {
         port => $self->port,
         host => $self->host,
         keepalive => $self->keepalive ? 100 : 1,
+        server_ready => sub {
+            my ($args) = @_;
+
+            my $name  = $args->{server_software} || ref($args); # $args is $server
+            my $host  = $args->{host} || 0;
+            my $proto = $args->{proto} || 'http';
+
+            print STDERR "$name: Accepting connections at $proto://$host:$args->{port}/\n";
+        },
     );
 }