- Mojolicious version: 9.34
- Perl version: 5.34
- Operating system: Ubuntu 22.04
Steps to reproduce the behavior
Inspired by the example in #2094
use v5.34;
use Mojolicious::Lite -signatures;
$test;
app->start;
Then run with morbo
Expected behavior
Something like
Web application available at http://127.0.0.1:3000
Can't load application from file "path to script": Global symbol "$test" requires explicit package name (did you forget to declare "my $test"?) at "path to script" line 3.
Compilation failed in require at (eval 93) line 1.
Actual behavior
Instead I get
Web application available at http://127.0.0.1:3000
Can't load application from file "path to script": "path to script" did not return a true value at path/lib/perl5/Mojo/Server.pm line 59.
Which makes debugging ones own mistakes rather hard.
Note that the problem is related to #2097 which changed
my $app = eval "package Mojo::Server::Sandbox::@{[md5_sum $path]}; require \$path";
in Mojo/Server.pm into
my $app = eval "package Mojo::Server::Sandbox::@{[md5_sum $path]}; do \$path";
(plus some extra checks).
Manually changing do back into require makes morbo behave like normal.
Steps to reproduce the behavior
Inspired by the example in #2094
Then run with
morboExpected behavior
Something like
Actual behavior
Instead I get
Which makes debugging ones own mistakes rather hard.
Note that the problem is related to #2097 which changed
in
Mojo/Server.pminto(plus some extra checks).
Manually changing
doback intorequiremakesmorbobehave like normal.