Skip to content
Browse files

accept Starman-style arguments (by chiba)

  • Loading branch information...
1 parent f5112b6 commit 0dab391305e5676c1cace1301ac856f30494f78e @kazuho committed Jul 30, 2010
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/Plack/Handler/Starlet.pm
  2. +2 −1 lib/Starlet/Server.pm
View
3 lib/Plack/Handler/Starlet.pm
@@ -26,7 +26,8 @@ sub new {
$listen_sock->fdopen($fd, 'w')
or die "failed to bind to listening socket:$!";
}
- my $max_workers = delete($args{max_workers}) || 10;
+ my $max_workers = delete($args{max_workers}) || delete($args{workers})
+ || 10;
# instantiate and set the variables
my $self = $klass->SUPER::new(%args);
View
3 lib/Starlet/Server.pm
@@ -42,7 +42,8 @@ sub new {
max_keepalive_reqs => $args{max_keepalive_reqs} || 1,
server_software => $args{server_software} || $class,
server_ready => $args{server_ready} || sub {},
- max_reqs_per_child => $args{max_reqs_per_child} || 100,
+ max_reqs_per_child =>
+ $args{max_reqs_per_child} || $args{max_requests} || 100,
is_multiprocess => Plack::Util::FALSE,
}, $class;

0 comments on commit 0dab391

Please sign in to comment.
Something went wrong with that request. Please try again.