[Petal] Expressions
Jean-Michel Hiver
jhiver@mkdoc.com
Tue, 30 Jul 2002 11:40:23 +0100
Hi List,
Code news
=========
I have found a bit of time to work on Petal's code yesterday and I
have implemented the following behavior:
* 'modifier:' rather than ':modifier'
* ability to use slashes as well as dots
* stackable modifiers, i.e.
$encode:uppercase:object/title
or <span petal:replace="encode:uppercase:object/title>
* You can escape any character using \
* New syntax to pass arguments to methods
Instead of using
foo.bar.baz 12 24 baz $variable
You can use
foo.bar.baz '12' '24' 'baz' variable
Which in Perl would look like:
$foo->bar->baz ('12', '24', 'baz', $variable);
And of course on top of that you can use modifiers in arguments if you
want... it's a bit of a smoked behavior, but you can write:
foo.bar.baz '12', '24', 'baz', encode:uppercase:variable
I think this feature is going to stay undocumented though.
I still need to write more tests and update the documentation. I'll do a
Petal 0.5 release this week-end, probably on sunday.
Questions for TAL experts:
==========================
* is, in TAL, path: the default? i.e. are
<expression> and
path: <expression>
always strictly equivalent?
This is because implenting :path (and alternates conditions with |) is
next on my Petal TODO list.
Best regards,
--
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
Jean-Michel Hiver - Software Director
jhiver@mkdoc.com
+44 (0)114 255 8097
================================================================
VISIT HTTP://WWW.MKDOC.COM