Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: The Power of Objects

by Mutant (Priest)
on Jul 29, 2005 at 16:14 UTC ( #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 :)


Comment on Re: The Power of Objects
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-09-18 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls