Skip to content

Instantly share code, notes, and snippets.

@shoorick
Created November 16, 2018 20:03
Show Gist options
  • Save shoorick/80fd67cc8e952179210367c1e66be266 to your computer and use it in GitHub Desktop.
Save shoorick/80fd67cc8e952179210367c1e66be266 to your computer and use it in GitHub Desktop.
%#= include 'header'; # Does not work
%# layout 'layout'; # Does not work
<%= $callee %> <%= $name %>!
Some text here.
#!/usr/bin/perl
# skipped
use strict;
use utf8;
use open qw( :std :utf8 );
# skipped
use Mojo::Template;
$template = '1.html.ep';
# skipped
my $mt = Mojo::Template->new->vars(1);
# skipped
my $callee = 'Dear';
my $first_and_middle_name = 'John';
my $out = $mt->render_file($template, {
'callee' => $callee,
'name' => $first_and_middle_name,
});
print $out;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment