in reply to Re^2: OOP: ->Coderef for calling Private Methods
in thread OOP: Obj->Coderef for calling Private Methods
Perl 5.6 does not have that feature (perlop 5.6). That explains why hackers use underscores and merlyn did not mention it in his book.
Perl doesn't care about $code_ref having to be a reference to a method. It's enough to be just a sub ref. The sub gets an $obj as first argument, that's all.
Update: broken link fixed
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: OOP: ->Coderef for calling Private Methods (5.6?)
by tye (Sage) on Dec 13, 2008 at 20:19 UTC | |
Re^4: OOP: ->Coderef for calling Private Methods
by LanX (Saint) on Dec 13, 2008 at 19:50 UTC |
In Section
Seekers of Perl Wisdom