perl has class that is parent of all classes. It is called Universal. type `perldoc Universal` in your shell. You can insert any function in it. But you don't need to. Perl object model is much flexible relative to strict Java's. AFAIK, Java does not have multiple inheritance. Perl does.
There is no need for Univeral::as_string (Perl equivalent of toString()) method as you can simply call as_string of any object if his class supports it (and to know that you can use Universal::can). You can think that as_string is an interface.
In reply to Re: Global Super Class (equivalent of java.lang.Object)
by chorny
in thread Global Super Class (equivalent of java.lang.Object)
by arunhorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |