- An object is simply a reference that happens to know which class it belongs to.
- A class is simply a package that happens to provide methods to deal with object references.
- A method is simply a subroutine that expects an object reference (or a package name, for class methods) as the first argument.
...
Whatever is on the left side of the arrow, whether a reference or a class name, is passed to the method subroutine as its first argument.
In reply to Re^5: OOP: ->Coderef for calling Private Methods (possibilites?)
by ccn
in thread OOP: Obj->Coderef for calling Private Methods
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |