Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Static method vs virtual methodby GrandFather (Saint) |
on May 10, 2009 at 23:58 UTC ( [id://763167]=note: print w/replies, xml ) | Need Help?? |
To the extent that those terms apply to Perl a 'virtual method' is called on an object instance using ->:
A 'static method' is simply a sub in an OO package that provides functionality related to the package's object type, but that isn't called in the context of an object instance. new is of this nature - it is used to create a new instance of the package's object. True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|