Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Global Super Class (equivalent of java.lang.Object)

by ides (Deacon)
on Sep 26, 2006 at 14:25 UTC ( [id://574948]=note: print w/replies, xml ) Need Help??


in reply to Global Super Class (equivalent of java.lang.Object)

I agree that putting methods into UNIVERSAL is a bad idea. However, there isn't anything wrong with having a base class for like objects. MyApp::Base::User for differnet types of users, etc. You get the idea.

Personally, I find it very rare that I have any methods that I want to provide for all objects in an application that can't be provided without the need for such a generate base class. For example, if I wanted to toString() an object I would just use Data::Dumper on the object itself.

Frank Wiles <frank@revsys.com>
www.revsys.com

  • Comment on Re: Global Super Class (equivalent of java.lang.Object)

Log In?
Username:
Password:

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

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

    No recent polls found