Skip to content

Instantly share code, notes, and snippets.

@moritz
Created September 29, 2013 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/6752178 to your computer and use it in GitHub Desktop.
Save moritz/6752178 to your computer and use it in GitHub Desktop.
Mojolicious::Lite app triggers internal Perl error from Mojo::Exception
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!
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