Permalink
Browse files

Implemented Plack::Util::load_psgi

  • Loading branch information...
1 parent 1984615 commit 087e64135b6b71b6cdff004ab7ed0991aed8b98c @miyagawa committed Sep 26, 2009
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/Perlbal/Plugin/PSGI.pm
@@ -63,11 +63,7 @@ sub handle_psgi_app_command {
my $mc = shift->parse(qr/^psgi_app\s*=\s*(\S+)$/, "usage: PSGI_APP=<path>");
my ($app_path) = $mc->args;
- my $handler = do $app_path;
- unless (defined $handler && ref $handler eq 'CODE') {
- return $mc->err("Failed to load $app_path: " . ($! || $@))
- }
-
+ my $handler = Plack::Util::load_psgi $app_path;
my $svcname;
unless ($svcname ||= $mc->{ctx}{last_created}) {
return $mc->err("No service name in context from CREATE SERVICE <name> or USE <service_name>");

0 comments on commit 087e641

Please sign in to comment.