Skip Menu |

This queue is for tickets about the base CPAN distribution.

Report information
The Basics
Id: 30375
Status: resolved
Priority: 0/
Queue: base

People
Owner: Nobody in particular
Requestors: eycher [...] gmail.com
Cc:
AdminCc:

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



Subject: base.pm doesn't honor already installed $SIG{__DIE__} handlers
The latest version of base.pm overwrites global $SIG{__DIE} here: # Make sure a global $SIG{__DIE__} makes it out of the localization. $SIG{__DIE__} = $sigdie if defined $sigdie; Test suite is 3 files: 1. test.cgi 2. Foo.pm 3. Bar.pm test.cgi ======================================================================= #!/usr/bin/perl use strict; $SIG{__DIE__} = sub { print "We died in peace!\n"; }; require Bar; Bar::test(); 1; ======================================================================= Foo.pm ======================================================================= package Foo; sub test() { print "I am doing nothing!"; } 1; ======================================================================= Bar.pm ======================================================================= package Bar; use base qw(Foo); sub test { print "I am doing nothing and then die!\n"; die "died!"; } 1; ======================================================================= All files in the test suite should be placed in the same directory and then test.cgi should be run. With the latest version of base.pm (2.12) this is the output that I get after running test.cgi -- I am doing nothing and then die! died! at Bar.pm line 7. Expected output -- I am doing nothing and then die! We died in peace! died! at Bar.pm line 7. Note "We died in peace!" line in the second output which was printed by my die handler which seems to be overwritten by base.pm in the first output. Commenting out the following line in base.pm fixes the problem: $SIG{__DIE__} = $sigdie if defined $sigdie;
From: eycher [...] gmail.com
Tested on perl v5.8.5 and perl v.5.8.8 on Linux hostname 2.6.9-55.0.6.ELsmp #1 SMP Thu Aug 23 11:11:20 EDT 2007 i686 i686 i386 GNU/Linux and Linux hostname 2.6.18-8.1.8.el5 #1 SMP Mon Jun 25 17:06:19 EDT 2007 i686 i686 i386 GNU/Linux and Windows XP SP2 (with ActivePerl and latest base.pm)
From: jloverso [...] mathworks.com
This does appear fixed with 2.14.