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 jeffa (Chancellor)
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
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 chilling in the Monastery: (9)
As of 2014-09-17 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (99 votes), past polls