Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: The Power of Objects

by jeffa (Bishop)
on Jul 28, 2005 at 18:34 UTC ( [id://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)

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://479081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-20 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found