in reply to Re^5: OOP: ->Coderef for calling Private Methods (possibilites?)
in thread OOP: Obj->Coderef for calling Private Methods

"either the method name or a subroutine reference",

Till now, I haven't run any tests, but it's not clear to read if it's a subroutine reference to a method or just to any subroutine.

some additional phrases and examples are missing!

It's perfectly possible that perl might do a check if the coderef is in the STASH of the class.

and I don't see why such a powerful feature should be hidden in 3 dispersed half-phrases in the perldocs.

Cheers Rolf

  • Comment on Re^6: OOP: ->Coderef for calling Private Methods (possibilites?)

Replies are listed 'Best First'.
Re^7: OOP: ->Coderef for calling Private Methods (possibilites?)
by ikegami (Patriarch) on Dec 13, 2008 at 20:34 UTC

    it's not clear to read if it's a subroutine reference to a method or just to any subroutine.

    There's no such things as methods. There are methods calls and subroutine calls.

    If you mean it's not clear whether the it's a method call or a subroutine call, what gives you the impression it can be anything but a method call?

      It's funny how you guys call the documentation perfect which talks about "methods" and simultaneously you say "There's no such things as methods".

      Why are you all so obsessed to deny that the documentation could be extended with some extra words on this feature?

      Sorry if I repeat myself, but the documentation should be clear for a beginner!

      so I'm leaving this discussion, it's saturday night and I will anyway stay minority!

        but the documentation should be clear for a beginner!

        And I'm asking how. Again, what part of the documentation gives you the impression it can be anything but a method call? Nowhere at all are subroutine calls mentioned.