Permalink
Browse files

Set loader in new() rather than argv

  • Loading branch information...
1 parent 78ae4b6 commit 37db31858f9552a98975c7e84ea163e1e6131585 @miyagawa committed Apr 14, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 bin/starman
View
@@ -16,13 +16,14 @@ Getopt::Long::GetOptions(
"preload-app" => \$preload_app,
);
-my @argv = @ARGV;
+my @args = (server => 'Starman', env => 'deployment', version_cb => \&version);
if (!$preload_app) {
- # XXX: warn if @argv contains -r, -R, -L.
- push @argv, '--loader' => 'Delayed';
+ push @args, 'loader' => 'Delayed';
}
-my $runner = Plack::Runner->new(server => 'Starman', env => 'deployment', version_cb => \&version);
+my @argv = @ARGV;
+
+my $runner = Plack::Runner->new(@args);
$runner->parse_options(@argv);
$runner->set_options(argv => \@argv);
$runner->run;

0 comments on commit 37db318

Please sign in to comment.