with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
-
has debug => (
traits => [qw(Getopt)],
cmd_aliases => 'd',
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";
+ },
);
}