Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

migrated the error message to Lint

  • Loading branch information...
commit d9e1ee4deff1c52b4efce5cd1a56f937f8526102 1 parent b5be306
Tatsuhiko Miyagawa miyagawa authored

Showing 2 changed files with 2 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 1  lib/Plack/Middleware/Lint.pm
  2. +1 4 lib/Plack/Util.pm
2  lib/Plack/Middleware/Lint.pm
@@ -10,7 +10,7 @@ sub wrap {
10 10 my($self, $app) = @_;
11 11
12 12 unless (ref $app eq 'CODE' or overload::Method($app, '&{}')) {
13   - Carp::croak("PSGI app should be a code reference: $app");
  13 + Carp::croak("PSGI app should be a code reference: ", (defined $app ? $app : "undef"));
14 14 }
15 15
16 16 $self->SUPER::wrap($app);
5 lib/Plack/Util.pm
@@ -125,10 +125,7 @@ sub load_psgi {
125 125 die "Error while loading $file: $@" if $@;
126 126
127 127 return $app->to_app if $app and Scalar::Util::blessed($app) and $app->can('to_app');
128   - return $app if $app and (ref $app eq 'CODE' or overload::Method($app, '&{}'));
129   -
130   - Carp::croak( "$file did not return a PSGI app handler code reference. Instead it returned: "
131   - . ( defined $app ? $app : 'undef' ));
  128 + return $app;
132 129 }
133 130
134 131 sub run_app($$) {

0 comments on commit d9e1ee4

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