* Ricardo SIGNES <[EMAIL PROTECTED]> [2005-11-03 19:20]:
> * Pete Krawczyk <[EMAIL PROTECTED]> [2005-11-03T12:46:48]
> >
> > The solution I see is to make sure the object can() isa(),
> > thus avoiding the die in the process:
> >
>
> It was using ->isa instead of UNIVERSAL::isa because isa might
> be overridden. Surely the same could apply to ->can.
There are two possible answers:
a) Then wrap another layer around it, ie
if( UNIVERSAL::can( $object, 'can' ) and $object->can( 'isa' ) ) {
# ...
}
b) Who cares? We just want to know whether calling ->isa() is
safe, and UNIVERSAL::can answers that handily.
Personally I think Pete’s fix is precisely the correct one.
Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;