in reply to Re^6: OOP: ->Coderef for calling Private Methods (possibilites?)
in thread OOP: Obj->Coderef for calling Private Methods
> How does Perl know which package the subroutine is in?
It concerns calling by name only. If perl has a reference to code it just executes it. There is no need to determine a package for the call. And the sub itself knows the package it belongs to.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: OOP: ->Coderef for calling Private Methods (possibilites?)
by LanX (Saint) on Dec 13, 2008 at 20:34 UTC |