go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Static methods expect a class name as the first argument. 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. Static methods aren't called from an instance of an object, but instead directly from the package name: Virtual methods or instance methods expect a reference to an object as the first argument. Static methods are class-wide; virtual methods are object-specific.
--Lakshmanan G.
The great pleasure in my life is doing what people say you cannot do. In reply to Re: Static method vs virtual method
by lakshmananindia
|
|