Subject: | bad B::COP->warnings from B::Generate |
Date: | Sun, 21 Aug 2011 15:15:01 +0100 |
To: | bug-B-Generate [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
B::Generate replaces B::COP->warnings with a version that is not
compatible with the original version from B. The B::Generate version
returns undef in all the situations I've tried, whereas the B version
returns a B::SPECIAL or B::PV:
$ perl -MData::Dumper=Dumper -MB::Compiling=PL_compiling -e 'BEGIN { print Dumper(scalar PL_compiling->warnings) }'
$VAR1 = bless( do{\(my $o = 6)}, 'B::SPECIAL' );
$ perl -MB::Generate -MData::Dumper=Dumper -MB::Compiling=PL_compiling -e 'BEGIN { print Dumper(scalar PL_compiling->warnings) }'
$VAR1 = undef;
B::Deparse relies on ->warnings returning one of these blessed objects,
and so crashes if B::Generate is loaded:
$ perl -MB::Generate -MO=Deparse -e '123'
While deparsing -e near line 1,
Can't call method "isa" on an undefined value at /home/zefram/usr/perl/perl_install/perl-5.14.1-i32-f52/lib/5.14.1/B/Deparse.pm line 1412.
CHECK failed--call queue aborted.
-zefram