The Petal templating system also allows you to call functions on objects, and even in a relatively nice (but still ad-hoc) fashion:

# template <a tal:attribute="href object/link" href="test_link">Test link</a> # the matching code: my $object = {}; bless 'Obj', $object; my $i = 0; sub Obj::link { return sprintf "", $i; };

In reply to Re: Callbacks and templates. by Corion
in thread Callbacks and templates. by LukeyBoy

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":