X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=git-instaweb.sh;h=8bfa8a055ccd0c344d595f112b571bb3d6e21c28;hb=2eee1393f39953d27b63070fdb5c533082f28f0c;hp=10fcebb119ce2af81527aa3c24a9b7c3ab3b3e7f;hpb=e39212ab08e8d37dda5d8fd32b54099fe01dbbdb;p=thirdparty%2Fgit.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 10fcebb119..8bfa8a055c 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -558,12 +558,14 @@ my \$app = builder { # make it runnable as standalone app, # like it would be run via 'plackup' utility -if (__FILE__ eq \$0) { +if (caller) { + return \$app; +} else { require Plack::Runner; my \$runner = Plack::Runner->new(); \$runner->parse_options(qw(--env deployment --port $port), - "$local" ? qw(--host 127.0.0.1) : ()); + "$local" ? qw(--host 127.0.0.1) : ()); \$runner->run(\$app); } __END__