Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Callbacks and templates.

by Corion (Patriarch)
on Apr 13, 2004 at 06:45 UTC ( [id://344636]=note: print w/replies, xml ) Need Help??


in reply to Callbacks and templates.

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 "http://www.google.com?q=%s+Number", $i; };

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://344636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-03-28 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found