[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Nested ePerl tags implementation



On Wed, Nov 08, 2000 at 11:15:16PM +0300, Petr Andreyev wrote:
> Hello!
> 
> I found the following problem when using <perl... tags defined in std/tags.wml
> (I am sorry if this is a known issue): (the funny) nesting ePerl tags
> construction sometimes does not work. An example
> 
> #use wml::std::tags
> <define-tag nesting endtag=required whitespace=delete>
> <perl>
>     <perl:assign:sq $body>%body</perl:assign:sq>
>     <perl:print: $body>
> </perl>
> </define-tag>
> <nesting><nesting>ABC</nesting></nesting>
> <nesting>D<nesting>E</nesting>F</nesting>
> 
> 
> This script produces:
> ABC
> 
> I found the reason for such a behaviour. Here is the diff:
> 
> 181,182c181
> <    $perl_var<substract <get-var __perl:level /> 1 /> .= <<"EPERL_EOT";
> < <perl:var />\
> ---
> >    $perl_var<substract <get-var __perl:level /> 1 /> .= <perl:var /> . <<"EPERL_EOT";
> 
> It works. In particular, with the new version of tags.wml the example above
> produces:
> ABC
> DEF

Hi Petr,

congratulations, this is a very nice report.  Your patch has been
committed.  In order to make Perl code more robust, i also put braces
around Perl variable name, e.g.
   ${perl_var<substract <get-var __perl:level /> 1 />}
Thanks for your help.

-- 
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com