# at the end of template results in a error #603

Closed
chorny opened this Issue Mar 7, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@chorny

chorny commented Mar 7, 2014

test code:

use Mojo::Template;

# Simple
my $mt = Mojo::Template->new;

my $output = $mt->render(<<'EOF');
test
% #
EOF
print $output;

Output:

-- Code for template
package Mojo::Template::SandBox; use Mojo::Base -strict;sub { my $_M = ''; ; do { $_M .= "test\n";
 # ; $_M } };

Missing right curly or square bracket at template line 3, at end of line
syntax error at template line 3, at EOF

@kraih kraih closed this in ae158f2 Mar 7, 2014

@kraih

This comment has been minimized.

Show comment Hide comment
@kraih

kraih Mar 7, 2014

Owner

Thanks, fixed.

Owner

kraih commented Mar 7, 2014

Thanks, fixed.

@kraih

This comment has been minimized.

Show comment Hide comment
@kraih

kraih Mar 8, 2014

Owner

Btw. This is the code Mojo::Template generates now.

-- Code for template
#line 1 "template"
package Mojo::Template::SandBox; use Mojo::Base -strict; sub { my $_M = ''; ; do { $_M .= "test\n";
 # 
#line 2 "template"
; $_M } };
Owner

kraih commented Mar 8, 2014

Btw. This is the code Mojo::Template generates now.

-- Code for template
#line 1 "template"
package Mojo::Template::SandBox; use Mojo::Base -strict; sub { my $_M = ''; ; do { $_M .= "test\n";
 # 
#line 2 "template"
; $_M } };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment