use Perl Log In
Petal, Perl Implementation of Zope's TAL
Jean-Michel Hiver writes "These guys from Zope have really interesting ideas. Among then is a really cool spec called TAL that lets them build WYSIWYG-friendly template by just using HTML attributes rather than having special extra tags. Petal is an attempt to reproduce TAL functionality in Perl and also to take it further by enhancing its syntax and XML processing capabilites. Check out the documentation and mailing list."
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.

Another templating system? (Score:2)
Everyone seems to write their own template system with slightly different syntax / features and then upload it to the CPAN. Far be it from me to dissuade you doing the same.
Have you read Choosing a Templating System [perl.com]?
What does TAL provide that, say the Template Toolkit or AxKit does not? Wouldn't it be better to rely on a module that has had years of testing, complete documentation, an active support group and many users tha
Re:Another templating system? (Score:1)
More importantly it means that Zope-Compatible or Competitive CMS can be written in perl.
One of the great things about Open Source is the level of competition and also the way in which many components are fairly easy to interchange.
@JAPH = qw(Hacker Perl Another Just);
print reverse @JAPH;
Re:Another templating system? (Score:1)
Re:Another templating system? (Score:1)
-Dom
Re:Another templating system? (Score:1)
Actually, yes I _DID_ read Perrin Harkins' Choosing a Templating System [perl.com] article and none of the templating systems listed here offer the same functionality as Petal.
I have sent an email to Perrin Harkins and here is an extract of his reply:
Because there are so many template tools (literally dozens) and most of them have very few distinguishing features, I try to limit the number of tools described in detail in my document.In general, I have only talked about the most widely used ones, and just listed t
Re:Another templating system? (Score:2)
Nice, but... (Score:1)
Nice twist on the old templating system scheme. Not sure CPAN needed YATS, but hey, it's a commons, post bills where you may.
A few issues you might consider:
local().Re:Nice, but... (Score:1)
This is near the top of Jean-Michels TODO list and it will get fixed.
I also want to see support for Xincludes [webarch.co.uk].
Re:Nice, but... (Score:1)
Globals. As for getting rid of the globals, why not, but I'm pretty sure that I have made it so that it is not likely to be screwed by other modules... I have also spent a great deal of time making sure that Petal leaks no memory for persistent environments a la mod_perl. In other words, I'm not sure about what you mean. Can you give a better explanation?
As for CPAN namespace, there was a bit of a fight on the modules list about it. Basically the suggested name was Template::Petal. I think that generic n
Re:Globals (Score:1)
Consider an app that wants two petal processors; how do you allow that app to configure them differently? Right now, the user has to be a bit savvy and write a wrapper sub, preferably using local() to set each of the $Petal::foo settings the way they want. By allowing
You offer the service of encapsulation in addition to the service of handling templates. Now maybe Petal does that under the hood, but the docs say that you have to set some options as globals and
Re: PIs & quoting (Score:1)
Here's what
looks like to an XML parser (much snippage):
Note that there is no differentiation between
"and"in the parsed output; this pretend attribute syntaYes, finally another templating system (Score:1)
I, too, used to think like Grumpy old Leon. I've used lots of templating libraries and often wished for a better solution but kept being disappointed with the latest template library released to CPAN. Petal is a different beast than the typical search-and-replace library.
The template attribute language (TAL) is a great solution for mini-language templates (see Perrin's Choosing a Template Language [perl.com]), and Jean-Michel has done an admirable job of creating a module that implements this functionality in Perl.
Sold (Score:1)
It's really nice for generating static web sites. The fact that it isn't joined at the hip with mod_perl gives it a nice low threshold for developers who want to use it.
original ideas (Score:1)
this is not by any means to dismiss Zope, just that the ideas are not novel.