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?? |
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>
In Section
Seekers of Perl Wisdom
|
|