Skip to content

Confusing error 'XXX - Not supported' with FOREACH directive. #30

@uncleawie

Description

@uncleawie

I am not sure if this issue requires a fix, but I am posting this in case anyone else thinks Jemplate doesn't support FOREACH directives. When diagnosing my first template compilation I isolated it down to this template:

[%- SET list = [1,3,5] -%]
[%- FOREACH i iN list -%]
[%- i -%]
[%- END -%]

Compiling results in the disheartening error:

$ jemplate --compile views/test.tt
/*
   This JavaScript code was generated by Jemplate, the JavaScript
<snip>
line 4: XXX - Not supported yet at /Users/awie/local/perl-5.22.0/lib/site_perl/5.22.0/Jemplate/Directive.pm line 291. at /Users/awie/local/perl-5.22.0/lib/site_perl/5.22.0/Jemplate.pm line 374.

In fact the issue was simply that the IN needed to be in all caps.

Cheers

Awie

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions