UNIVERSAL::isa - Hack around stupid module authors using UNIVERSAL::isa as a function when they shouldn't.
echo 'export PERL5OPT=-MUNIVERSAL::isa' >> /etc/profile
Whenever you use UNIVERSAL/isa 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 if
it's called as a function on objects which override isa
, isa
will be
called on those objects as a method.
In all other cases the real UNIVERSAL::isa
is just called directly.
If the lexical warnings pragma is available, a warning will be emitted for each
naughty invocation of UNIVERSAL::isa
. These warnings can be silenced by
saying:
no warnings 'UNIVERSAL::isa';
in the lexical scope of the naughty code.
UNIVERSAL::can for a more mature discussion of the problem at hand.
Autrijus Tang <autrijus@autrijus.org>
chromatic <chromatic@wgz.org>
Yuval Kogman <nothingmuch@woobling.org>
Same as perl, blah blah blah, (c) 2005