Don't ask to ask, just ask | |
PerlMonks |
Re^2: Static method vs virtual methodby przemo (Scribe) |
on May 09, 2009 at 12:26 UTC ( [id://763035]=note: print w/replies, xml ) | Need Help?? |
Generally, static methods ignore the first argument because they already know which class they are in. new() is implemented by almost all packages as a static method. Yet, because of inheritance and possibility of being called on behalf of other package, well-behaving new() shouldn't ignore the first argument. In simplified case like this:
In Section
Seekers of Perl Wisdom
|
|