in reply to Re: OOP: ->Coderef for calling Private Methods
in thread OOP: Obj->Coderef for calling Private Methods
I agree there is no logical reason for extra behaviour...
> And the docs are clear and complete here as it seems to me.
Sorry, I disagree! Till now, I couldn't find any other perldoc describing this feature , and perlop is just a condensed quick reference. IMHO Perl has to many special cases to rely on just 3 words in a quickref.
I think it's quite unknown, taking into consideration that most hacker prefere the _underscore_private_method() convention instead.
Even Merlyn's Book on Perl-Objects and Refrences doesn't list this behaviour, (at least it's not indexed)
For me it looks like the documentation should be improved!
Cheers Rolf
UPDATE: And what really makes my brain stumble, what is the expected behaviour when i call $obj->$code_ref() and code_ref doesn't point to a method (of the blessed package).
Am I supposed to run experiments to find it out?
Please can anyone give me a link to any documentation!
|
|---|