Created
December 25, 2014 14:11
-
-
Save eviltik/a64843f904e7f97b2961 to your computer and use it in GitHub Desktop.
mojolicious: Can't use string ("json") as a HASH ref while "strict refs" in use
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
Versions: | |
CORE | |
Perl (v5.14.2, linux) | |
Mojolicious (5.70, Tiger Face) | |
OPTIONAL | |
EV 4.0+ (not installed) | |
IO::Socket::Socks 0.64+ (not installed) | |
IO::Socket::SSL 1.84+ (1.999) | |
Net::DNS::Native 0.14+ (not installed) | |
Code: | |
use Mojo::Base 'Mojolicious'; | |
sub startup { | |
my $self = shift; | |
my $r = $self->routes; | |
$r->get('/test')->render(json => {x => 3}); | |
} | |
Error at startup: | |
Can't load application from file "/var/www/GGCC/script/test": Can't use string ("json") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.14.2/Mojolicious/Routes/Pattern.pm line 63. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you just can not "render" a "route", noob mistake