On 8/15/05, jonathan vanasco <[EMAIL PROTECTED]> wrote:

 
> Petal templates do look nice, because
>      <span tal:replace="my_var/hello_world 'Jack'">Hola, Mundo!</span>
> is valid xhtml AND lets you have mockup text that is then replaced
> 
> Unfortunately, petal supports all the smart features of tal like if/
> loops (stuff I didn't want in there), but its ok.  i'll deal.

Hmm.  So if you were doing substituting with

    $template_copy =~ s
                                {<span tal:replace="(.+?)".+?</span>}
                                {$template_var_hashref->{$1}}g;

would that do everything you need?

I'm seriously considering publishing a Template::Substitution::KISS or
something like that in a futile attempt to piss higher than Uri Guttman.

With the substitution target regex configurable, it could be used against
arbitrary variable identification syntaces.
        

-- 
David L Nicol
Do you really not know the difference between
underscore and dash or are you just being difficult?

Reply via email to