Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: The Power of Objects

by jeffa (Bishop)
on Jul 28, 2005 at 18:34 UTC ( #479081=note: print w/ replies, xml ) Need Help??


in reply to The Power of Objects

Just a comment on your constructor -- it doesn't seem right to me. You subclass HTML::Template, but you also instantiate one, rebless it and return that instead of calling SUPER::new(). Seems a little a strange, almost like a Factory ... anyways, here's how i might have coded it instead:

sub new { my $class = shift; my %params = @_; return $class->SUPER::new( %params, die_on_bad_params => 0, ); }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re: The Power of Objects
Download Code
Replies are listed 'Best First'.
Re^2: The Power of Objects
by Mutant (Priest) on Jul 29, 2005 at 10:18 UTC
    You're right. I'm not sure how I ended up with that. I'll update with your suggestion.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2015-07-08 04:22 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 (94 votes), past polls