in reply to Do not use UNIVERSAL::isa this way; but why?

The documentation is wrong.

While the point another commenter made about can and isa being overridden is valid, that doesn't mean that you should never use them like that. Just that you should be really sure that that's what you want to do.

Replies are listed 'Best First'.
Re^2: Do not use UNIVERSAL::isa this way; but why?
by ikegami (Patriarch) on Dec 12, 2008 at 17:23 UTC

    Just that you should be really sure that that's what you want to do.

    And when would it be what you want to do? No, ->isa is always the way to go. Feel free to wrap it in an eval if you need.

    my $isa = eval { $questionable->isa($class) };