From: Jerrad Pierce Date: Sun, 10 Dec 2006 14:38:18 +0000 (-0500) Subject: Fatal v1.03 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=910ad8ddac314a1e7431e609ac34bf3a0adc304b;p=p5sagit%2Fp5-mst-13.2.git Fatal v1.03 Message-Id: <200612101938.kBAJcI9D008026@all-night-tool.mit.edu> Allow to make fatal built-ins in CORE::GLOBAL p4raw-id: //depot/perl@29507 --- diff --git a/lib/Fatal.pm b/lib/Fatal.pm index b939f0c..ad2f7f4 100644 --- a/lib/Fatal.pm +++ b/lib/Fatal.pm @@ -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" };