Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
The stupid question is the question not asked
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.