Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Static method vs virtual method

by GrandFather (Saint)
on May 10, 2009 at 23:58 UTC ( [id://763167]=note: print w/replies, xml ) Need Help??


in reply to Static method vs virtual method

To the extent that those terms apply to Perl a 'virtual method' is called on an object instance using ->:

$obj->methodName (...);

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://763167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found