in reply to Re^4: OOP: ->Coderef for calling Private Methods (possibilites?)
in thread OOP: Obj->Coderef for calling Private Methods
- 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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: OOP: ->Coderef for calling Private Methods (possibilites?)
by LanX (Saint) on Dec 13, 2008 at 20:16 UTC | |
by ccn (Vicar) on Dec 13, 2008 at 20:27 UTC | |
by LanX (Saint) on Dec 13, 2008 at 20:34 UTC | |
|
Re^6: OOP: ->Coderef for calling Private Methods (possibilites?)
by ikegami (Patriarch) on Dec 13, 2008 at 20:03 UTC |