Permalink
Browse files

Make starman script use Delayed loader by default.

You can disable the behaviour by invoking starman with --preload-app
  • Loading branch information...
1 parent 993c66e commit 0dbcca8fceacb161bdda17d64870b2d2514fa588 @clkao clkao committed Apr 13, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 bin/starman
View
@@ -8,7 +8,19 @@ sub version {
print "Starman $Starman::VERSION\n";
}
+my $preload_app;
+
+require Getopt::Long;
+Getopt::Long::Configure("no_ignore_case", "no_auto_abbrev", "pass_through");
+Getopt::Long::GetOptions(
+ "preload-app" => \$preload_app,
+);
+
my @argv = @ARGV;
+if (!$preload_app) {
+ # XXX: warn if @argv contains -r, -R, -L.
+ push @argv, '--loader' => 'Delayed';
+}
my $runner = Plack::Runner->new(server => 'Starman', env => 'deployment', version_cb => \&version);
$runner->parse_options(@argv);

0 comments on commit 0dbcca8

Please sign in to comment.