UNIVERSAL::isa(3)

NAME
UNIVERSAL::isa - Attempt to recover from people calling UNIVERSAL::isa as a function

SYNOPSIS
        # from the shell
        echo 'export PERL5OPT=-MUNIVERSAL::isa' >> /etc/profile

        # within your program
        use UNIVERSAL::isa;

DESCRIPTION
Whenever you use "isa" in UNIVERSAL as a function, a kitten using Test::MockObject dies. Normally, the kittens would be helpless, but if they use UNIVERSAL::isa (the module whose docs you are reading), the kittens can live long and prosper.

This module replaces "UNIVERSAL::isa" with a version that makes sure that, when called as a function on objects which override "isa", "isa" will call the appropriate method on those objects

In all other cases, the real "UNIVERSAL::isa" gets called directly.

WARNINGS
If the lexical warnings pragma is available, this module will emit a warning for each naughty invocation of "UNIVERSAL::isa". Silence these warnings by saying:

        no warnings 'UNIVERSAL::isa';

in the lexical scope of the naughty code.

SEE ALSO
UNIVERSAL::can for a more mature discussion of the problem at hand.

Test::MockObject for one example of a module that really needs to override "isa()".

AUTHORS
Autrijus Tang <autrijus@autrijus.org>

chromatic <chromatic@wgz.org>

Yuval Kogman <nothingmuch@woobling.org>

COPYRIGHT & LICENSE
Same as Perl, (c) 2005 - 2006.