Skip to content

Instantly share code, notes, and snippets.

@shoorick
Created November 16, 2018 20:09
Show Gist options
  • Save shoorick/ebc98bc79ee9e241b4ec80cc38f4e496 to your computer and use it in GitHub Desktop.
Save shoorick/ebc98bc79ee9e241b4ec80cc38f4e496 to your computer and use it in GitHub Desktop.
%= include 'header';
<%= $callee %> <%= $name %>!
Some text here
#!/usr/bin/perl
# skipped
use strict;
use utf8;
use open qw( :std :utf8 );
# skipped
use Mojolicious;
my $template = '2.html.ep';
# skipped
my $mt = (my $app = Mojolicious->new)->renderer;
# skipped
my $callee = 'Dear';
my $first_and_middle_name = 'John';
my $out = $mt->render($template, {
'callee' => $callee,
'name' => $first_and_middle_name,
});
print $out;
# Can't locate object method "stash" via package "2.html.ep" (perhaps you forgot to load "2.html.ep"?) at /usr/share/perl5/Mojolicious/Renderer.pm line 78.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment