Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
<div> Number<%= $data->{ box } %> Test: <%= $test %> </div>
... my $mt = Mojo::Template->new( vars => 1, auto_escape => 1 ); my $data = ... # Not where the issues is. my $code = "PERL"; print $q->header( -charset => 'utf-8' ), $mt->render_file( myfile.html +.ep, { data => $data }, { test => $code } ); ...
Global symbol "$test" requires explicit package name at myfile.html.ep
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a value to Mojo::Template template
by haukex (Archbishop) on Apr 14, 2021 at 16:56 UTC | |
by Anonymous Monk on Apr 14, 2021 at 17:07 UTC | |
by haukex (Archbishop) on Apr 14, 2021 at 17:10 UTC | |
by Anonymous Monk on Apr 14, 2021 at 17:25 UTC | |
by choroba (Cardinal) on Apr 14, 2021 at 20:09 UTC | |
by Anonymous Monk on Apr 14, 2021 at 18:20 UTC | |
|