Semicolon in code block output breaks template_ng
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 737
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
The following template can be successfully processed by both the old and the new templating engine:
<%= 1 %>
It obviously returns 1.
However the following template can only be successfully processed by the old engine (the only difference is a semicolon):
<%= 1; %>
Template::NG fails with a syntax error, because it tries to process it internally as:
$self->__out( 1; );
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Template::NG entry point that transforms template expressions into output calls, using the two examples in this issue to reproduce the syntax error. Verify that both <%= 1 %> and <%= 1; %> process successfully and return 1, then run the relevant template-engine tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100