File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ sub _load_sandbox {
121121package Plack::Sandbox::%s;
122122{
123123 my $app = do $_file;
124- if ( !$app && ( my $error = $@ || $! )) { die $error; }
124+ if ( !$app && ( my $error = $@ || $! || "returned invalid value.\n")) {
125+ die $error;
126+ }
125127 $app;
126128}
127129END_EVAL
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ use Test::More;
4545 unlike $@ , qr / Died/ ;
4646}
4747
48+ {
49+ eval { Plack::Util::load_psgi(" t/Plack-Util/" ) };
50+ # Perl 5.20+ gives "Did you try to load a directory",
51+ # <=5.18 "No such file or directory"
52+ like $@ , qr / Error while loading/ ;
53+ }
54+
4855{
4956 my $app = Plack::Util::load_psgi(" t/Plack-Util/bin/findbin.psgi" );
5057 test_psgi $app , sub {
You can’t perform that action at this time.
0 commit comments