Created
September 29, 2013 12:38
-
-
Save moritz/6752178 to your computer and use it in GitHub Desktop.
Mojolicious::Lite app triggers internal Perl error from Mojo::Exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run | |
$ morbo minimal.pl | |
and then in your browser, call http://127.0.0.1:300/help/bla and you might get "panic: sv_setpvn called with negative strlen -2 at /home/moritz/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/Mojo/Exception.pm line 41." | |
$ mojo version | |
CORE | |
Perl (v5.18.1, linux) | |
Mojolicious (4.41, Top Hat) | |
OPTIONAL | |
EV 4.0+ (4.15) | |
IO::Socket::IP 0.16+ (0.22) | |
IO::Socket::SSL 1.75+ (1.953) | |
This version is up to date, have fun! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.014; | |
use warnings; | |
use Mojolicious::Lite; | |
app->secret('password123'); | |
get '/help/:page' => sub { | |
my $self = shift; | |
$self->render('help/private-profile'); | |
}; | |
app->start(); | |
__DATA__ | |
@@ help/private-profile.html.ep | |
% title 'Help - What's the point of private profiles?' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment