On 3 Jan 2008, at 21:02, Aristotle Pagaltzis wrote:
No. That calls `can` from the superclass, but passes
`__PACKAGE__` as the invocant. Assuming that the subclass and the
superclass use the same inherited `can` method, the result is
therefore exactly the same.

The correct incantation is

   my ( $super ) = grep { $_->can( $sub ) } @ISA;


Yes, I realised that as soon as I posted - hence my mini debate with myself. Then I went and fixed the dodgy bit of code I'd just written that used exactly that idiom :)

--
Andy Armstrong, Hexten




Reply via email to