Mojolicious enables use strict;
by default. Be thankful :)
The error is the same as you would get in perl code:
Bareword "fname" not allowed while "strict subs" in use at template hello.html.ep
Basically, you're just missing a dollar sign before fname
:
@@ hello.html.ep
<!doctype html><html>
<head><title>Placeholders</title></head>
<body><i>Hello <%= $fname %> <%= $lname %></li></body>
</html>
Or you can use this format as well:
@@ hello.html.ep
<!doctype html><html>
<head><title>Placeholders</title></head>
<body><i>Hello <%= param('fname') %> <%= param('lname') %></li></body>
</html>