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

Re: How do YOU do OO in Perl?

by tsee (Curate)
on Oct 08, 2003 at 13:51 UTC ( #297592=note: print w/ replies, xml ) Need Help??


in reply to How do YOU do OO in Perl?

Most of the time, I write straightforward Perl OO code using blessed hashrefs and cloning of objects when new() is called on prototypes. Add some AUTOLOAD from a fixed set of attributes (and run-time method generation for speedup).

I try to keep everything nice and subclassable, but when that just wouldn't work, I offer some extension mechanism via delegation like Math::Symbolic::Custom. Also, I tend to offer two interfaces. One kept as simple as possible for the general usage case and one involving things like closures for the ultimate control in pathological cases.

Steffen


Comment on Re: How do YOU do OO in Perl?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-09-16 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (46 votes), past polls