Fergal Daly wrote:
>> Oh, I see what it is.  Funny, I just fixed this exact problem in
>> aliased.pm.
>> http://rt.cpan.org/Public/Bug/Display.html?id=25293
>>
>> Its base.pm.
>>
>>             local $SIG{__DIE__};
>>             eval "require $base";
>>
>> Test::Builder::Module is loaded which loads Test::Builder which
>> instantiates a
>> __DIE__ handler which is localized and thrown out.
> 
> How is this not a bug in base.pm?

Because it is a bug.
http://rt.perl.org/rt3//Ticket/Display.html?id=42163


> I don't see a comment in there to
> justify it or explain what badness the author was attempting to avoid,

Its for the case where you're subclassing a class which does not have a .pm
file.  The require will fail, but base.pm can recover from that.  But they
don't want some global die handler interfering.


BEGIN { $SIG{__DIE__} = sub { print "OMG PONIES!!!!" }; }

{
    package Some::Class;
    sub foo { 42 }
}

{
    package Some::Other::Class;
    use base qw(Some::Class);
}

Reply via email to