This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fatal v1.03
authorJerrad Pierce <belg4mit@MIT.EDU>
Sun, 10 Dec 2006 14:38:18 +0000 (09:38 -0500)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 11 Dec 2006 10:32:47 +0000 (10:32 +0000)
Message-Id: <200612101938.kBAJcI9D008026@all-night-tool.mit.edu>

Allow to make fatal built-ins in CORE::GLOBAL

p4raw-id: //depot/perl@29507

lib/Fatal.pm

index b939f0c..ad2f7f4 100644 (file)
@@ -5,7 +5,7 @@ use Carp;
 use strict;
 our($AUTOLOAD, $Debug, $VERSION);
 
-$VERSION = 1.04;
+$VERSION = 1.05;
 
 $Debug = 0 unless defined $Debug;
 
@@ -99,7 +99,8 @@ sub _make_fatal {
        $sref = \&$sub;
        $proto = prototype $sref;
        $call = '&$sref';
-    } elsif ($sub eq $ini) {   # Stray user subroutine
+    } elsif ($sub eq $ini && $sub !~ /^CORE::GLOBAL::/) {
+       # Stray user subroutine
        die "$sub is not a Perl subroutine" 
     } else {                   # CORE subroutine
         $proto = eval { prototype "CORE::$name" };