XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What are the possibilities that you can't decide between without experiments? $obj->$code_ref(...) is the same as $code_ref->( $obj, ... ) and that seems pretty clear from the documentation. That the method is specified from a code ref would only change the fact that there is no need to look anything up in @ISA. code_ref doesn't point to a method Perl 5 has no concept of "method" separate from "sub" so it isn't possible for a code ref to point to something that isn't just the same as a method. Clearly you can use this technique to dispatch to something that can't be used as a regular method of a class since otherwise there would be little point in using the word "private" in the description. - tye In reply to Re^3: OOP: ->Coderef for calling Private Methods (possibilites?)
by tye
|
|