Skip Menu |

This queue is for tickets about the B-Generate CPAN distribution.

Report information
The Basics
Id: 70396
Status: resolved
Priority: 0/
Queue: B-Generate

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
From: rurban [...] x-ray.at
Am So 21. Aug 2011, 10:15:15, zefram@fysh.org schrieb: Show quoted text
> 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
Thanks a lot. Good catch.
Thanks! We are not writing cop warnings so I just disabled this wrong version, so B's version is taken. Resolved with the new 1.42 (commit 70bb7e5) -- Reini Urban