Attached is the patch that makes this work.  This was a relatively small and 
easy patch.

The DUMP patch is on its way but not done yet (all of the options have been 
tried and tested in CGI::Ex::Template - I just need to figure how to get TT 
to play nice now.

Paul
diff -r Template-Toolkit-2.19/lib/Template/Manual/Directives.pod Template-Toolkit-2.19-mine/lib/Template/Manual/Directives.pod
2142a2143,2145
> By default, if you pass custom tags to the TAGS directive, they
> will be quoted with the quotemeta perl function.  To use the tags
> unquoted, pass the keyword "unquoted" after the new custom tags.
2144,2146c2147,2148
< 
< 
< 
---
>     [% TAGS [<(]% %[)>] unquoted %]
>     <% INCLUDE header %>
diff -r Template-Toolkit-2.19/lib/Template/Parser.pm Template-Toolkit-2.19-mine/lib/Template/Parser.pm
372c372,379
<                     ($start, $end) = map { quotemeta($_) } @tags;
---
>                     ($start, $end, my $unquote) = @tags;
>                     for ($start, $end) {
>                         if ($unquote && $unquote =~ /^unquoted?$/i) {
>                             eval { "" =~ /$_/; 1 } || die "Invalid TAGS \"$_\": $@";
>                         } else {
>                             $_ = quotemeta $_;
>                         }
>                     }
diff -r Template-Toolkit-2.19/t/tags.t Template-Toolkit-2.19-mine/t/tags.t
214a215,235
> 
> #------------------------------------------------------------------------
> # unquoted custom TAGS
> #------------------------------------------------------------------------
> 
> -- test --
> [% TAGS [<(] [)>] -%]
> [<(] a = 10 -[)>]
> a is [<(] a [)>]
> -- expect --
> a is 10
> 
> -- test --
> [% TAGS [<(] [)>] unquoted -%]
> < a = 10 ->
> a is ( a )
> -- expect --
> a is 10
> 


Reply via email to