Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: The Power of Objects

by Mutant (Priest)
on Jul 29, 2005 at 16:14 UTC ( [id://479465]=note: print w/replies, xml ) Need Help??


in reply to The Power of Objects

Actually, I've discovered my solution above is *wrong*...

The problem is it's entirely reasonable to call a template without calling param(), eg.
my $tmpl = HTML::Template->new( filename => 'template.html' ); $tmpl->output();
Furthermore, param() is called a lot of times internally, behaving differently based on parameter types passed, so it's not trivial to override it.

In the end, I settled on overriding output(), and calling param() from there, setting the variables I needed. I don't think this changes the main point of my post, but I suppose I should use an example that actually works :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-03-28 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found