Strange bug in including inline template

9 views
Skip to first unread message

Alex Povolotsky

unread,
May 4, 2017, 5:24:56 AM5/4/17
to Mojolicious
Hello

The following app

<pre>
#!/usr/bin/env perl
use Mojolicious::Lite;

# Documentation browser under "/perldoc"
plugin 'PODRenderer';

get '/' => sub {
  my $c = shift;
  $c->render( 'index' );
};

app->start;
__DATA__

@@ index.html.ep
%=  include inline => '<%= 1 + 1 %>'
</pre>

fails with error I cannot understand

[Thu May  4 12:22:10 2017] [error] Can't find string terminator "'" anywhere before EOF at template index.html.ep from DATA section line 1.
1: %=  include inline => '<%= 1 + 1 %>'

When I replace <%= %> with any static data, everything works fine. <%= %> code moved to non-inline template works fine. Is it impossible to use inline with code?...
Reply all
Reply to author
Forward
0 new messages