Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: OOP - Sharing class methods

by mp (Deacon)
on Aug 14, 2002 at 19:09 UTC ( [id://190198]=note: print w/replies, xml ) Need Help??


in reply to Re: OOP - Sharing class methods
in thread OOP - Sharing class methods

Wow! Thank you all for the quick responses. Using a utility class, as suggested by you and perrin, seems like an intuititive way of handling this problem in the general case, especially if the shared code were to use multiple objects.

After thinking more about the specific application, I realized that there is already "a good fit" for the utility method in ClassThree because all the shared work is just calling a handful of existing instance methods in ClassThree. The new method then becomes a shortcut instance method that calls a number of its own instance methods.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-23 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found