Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 rifling through the Monastery: (15)
As of 2015-07-01 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls