in reply to Re^4: OOP: ->Coderef for calling Private Methods (possibilites?)
in thread OOP: Obj->Coderef for calling Private Methods
This? perlobj#Method-Invocation
- 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 Section
Seekers of Perl Wisdom