Subject: | Pod::Tree::HTML crashes Perl in ->isa calls |
Pod::Tree::HTML's approach to using isa causes perl to die when you do a simple
if ( Pod::Tree::HTML->isa('Pod::Tree::HTML') ) {
print "Pod::Tree::HTML is itself";
}
This is because you are doing something REALLY weird with UNIVERSAL::isa.
use vars qw{&isa}; # This breaks ->isa and is horribly horribly evil
local *isa = \&UNIVERSAL::isa; # Temporarily fix isa so it doesn't crash.
You really really need to fix this, it crashes any code or module that scans the symbol table of the current loaded application, as nobody would ever think to eval { $class->isa } once they've checked $class is a valid class name.
The alternative would be to simply use UNIVERSAL::isa directly the two times you use it.
isa $dest, 'HTML::Stream' and return $dest;
should become
UNIVERSAL::isa($dest, 'HTML::Stream') and return $dest;
Actually... that's not real friendly either, because it means that something can't mock or decorate a HTML::Stream object.
But getting rid of that use vars qw{&isa}; is the badly needed bit.