Hello folks, > On 03 Dec 2014, at 15:19, Guido Brugnara <g...@leader.it> wrote: > > If "\%" is acceptable in your case: > > <pre> > \%there lines start > % for my $x (1..3) { > \% this is <% $x %> > % } > \%there lines end > </pre> > <%filter> > s/^\\%/%/ > </%filter>
Your syntax is for HTML::Mason and not for Mason, but you’re right - the custom filter is an solution, e.g. the <%filter unesperc><% $yield->() =~ s/^\\%/%/gmr %></%filter> % $.unesperc {{ \%hello % for my $i (1..3) { \% test <% $i %> % } \% hello2 % }} is an working solution. Thank you for the suggestion of \% escape, will use this solution... > On 03 Dec 2014, at 18:48, Guido Brugnara <g...@leader.it> wrote: > > Another variant: > <%#%>%etc.etc. This nearly the same as <% $perc %> :) > Ignored by HTML browser: > ​%etc.etc > </>%etc.etc. > <!-->%etc.etc. Nice for HTML, unfortunately I generating a source code file for another programming language - (not for web). Anyway, the good solution is write a filter, as you suggested in the previous answer... But still I believe than this should be in the default Mason::Syntax, e.g. the escaped \% (or the double %%) at the very beginning of line should yield one plain \% - without custom filters. BTW, I asked the same question on the StackOverflow http://stackoverflow.com/q/27271657/632407 and the first comment what I got suggesting the double %% - so probably this is the most natural way … ;) :) > Dňa 3.12.2014 o 17:38, Jonathan Swartz <swa...@pobox.com> napísal: > There is also the <%text> section: Jonathan, did you checked my example? In the <%text> section I didn’t get expanded the <% $variable %>, e.g. the % for my $variable (1..3) { <%text> % <- need escape only the leading % not the whole line - want expand the following <% $variable %> </%text> % } will not works. The <%text> section is acceptable only if someone need ignore ALL Mason::Syntax (not only escape the leading %. Thank you anyway for the answer… jm. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users