in reply to Re^9: goto superclass method
in thread goto superclass method

Well, then, we're back to my other explanation. You're not calling can("SUPER::bar"). You're calling SUPER::can("bar"), so you're finding yourself. Don't do that. Stop saying SUPER::can. It means practically nothing other than "can", unless you have a "can" method in the current class.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^11: goto superclass method
by Aristotle (Chancellor) on Dec 23, 2004 at 00:40 UTC

    Something must have gotten lost along the way, because the fact that $self->SUPER::can("bar") is (usually) the same as $self->can("bar") is exactly what I was saying in the very first post… :-) (It can only be different if there is a can in one of the superclasses though, regardless of whether there is one in the current class.)

    Basically, I pointed out one of my two mistakes, then explained why it was a mistake, and came up with a broken solution because I missed something I thought I hadn't (that you can ask UNIVERSALL::can about 'SUPER::method'). Then you came along and pointed out my other mistake as well, but said that it somehow invalidated my correct explanation for the mistake I had already spotted.

    Makeshifts last the longest.