Re: [perl #41691] [PATCH] v5.8.8 pod2html -- Convert RFC links to point ot IETF pages
[p5sagit/p5-mst-13.2.git] / lib / Fatal.pm
index 9b0f28a..ad2f7f4 100644 (file)
@@ -1,11 +1,11 @@
 package Fatal;
 
-use 5.6.1;
+use 5.006_001;
 use Carp;
 use strict;
 our($AUTOLOAD, $Debug, $VERSION);
 
-$VERSION = 1.02;
+$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" };
@@ -177,10 +178,16 @@ values are ignored.  For example
        # not checked, so error raises an exception
        close FH;
 
+=head1 BUGS
+
+You should not fatalize functions that are called in list context, because this
+module tests whether a function has failed by testing the boolean truth of its
+return value in scalar context.
+
 =head1 AUTHOR
 
-Lionel.Cons@cern.ch
+Lionel Cons (CERN).
 
-prototype updates by Ilya Zakharevich ilya@math.ohio-state.edu
+Prototype updates by Ilya Zakharevich <ilya@math.ohio-state.edu>.
 
 =cut