This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quote string argument in example -- necessary if using strict subs
[perl5.git] / lib / diagnostics.pm
index 6016d96..3560f2d 100755 (executable)
@@ -3,7 +3,11 @@ eval 'exec perl -S $0  ${1+"$@"}'
     if 0;
 
 use Config;
-$diagnostics::PODFILE= $Config{privlib} . "/pod/perldiag.pod";
+if ($^O eq 'VMS') {
+   $diagnostics::PODFILE = VMS::Filespec::unixify($Config{'privlib'}) .
+                           '/pod/perldiag.pod';
+}
+else { $diagnostics::PODFILE= $Config{privlib} . "/pod/perldiag.pod"; }
 
 package diagnostics;
 require 5.001;
@@ -415,7 +419,8 @@ sub death_trap {
     if (caller eq $WHOAMI) { print STDERR "INTERNAL EXCEPTION: $exception"; } 
     &$olddie if defined $olddie and $olddie and $olddie ne \&death_trap;
     $SIG{__DIE__} = $SIG{__WARN__} = '';
-    confess "Uncaught exception from user code:\n\t$exception    Bailing out";
+    local($Carp::CarpLevel) = 1;
+    confess "Uncaught exception from user code:\n\t$exception";
        # up we go; where we stop, nobody knows, but i think we die now
        # but i'm deeply afraid of the &$olddie guy reraising and us getting
        # into an indirect recursion loop