阅读背景:

在Perl中存储UNIVERSAL方法的位置

来源:互联网 

So I understand that the special UNIVERSAL class is to be considered the base class from which all other objects are created. So if a specific method is not found after Perl traverses the inheritance hierarchy, it will look in the UNIVERSAL class to see if the method can be found there. However, when you create a distribution, no UNIVERSAL.pm package is created. Also, the UNIVERSAL methods 'DOES' and 'can' already exist without a UNIVERSAL.pm... As such, I am not sure if I should be writing UNIVERSAL methods into random packages like so:So I understand that the special UNIVERSAL clas




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: