[Templates] Re: PROPOSAL: Add COMMENT BLOCK directive.
Josh Rosenbaum
josh@infogears.com
Thu, 14 Jun 2007 12:30:02 -0600
Paul Seamons wrote:
>> Having a [%#* *#%] would be very nice. I would prefer that over the [%
>> COMMENT %]...[% END %] syntax.
>>
>> Possible bonus points if it can handle comments inside comments. For
>> example by detecting the character after the '#'. ie: [%#1
>> blah...
>> [%#0
>> foo ...
>> [%#* Some other crazy code *#%]
>> bar...
>> 0#%]
>> 1#%]
>
> The Perl 6ish way to do things would be to allow things like
>
> [%#*****
>
> [%#**
>
> [%#*
>
> *#%]
>
> **#%]
>
> *****#%]
>
> Essentially - however many stars you have you need to have later on. I forget
> which Perl 6 constructs use this. Thinking about it, this works in Perl 5
> POD (as in C<< < >>). That way you add as many stars as are necessary to
> wrap whatever you have - but usually you'll only need [%#* *#%].
>
> If we can get a ruling either way I'll add it to Template::Alloy which will
> make it available in Template::Parser::CET which will make it available for
> use on TT.
I'm fine with either way really. Might be best to use the multiple star method you suggest so other characters can be utilized for other possible purposes later on.
-- Josh