From 38eb6b314484c5855887504c3cc7f0e12cb5be85 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 1 Mar 2021 17:05:38 -0700 Subject: [PATCH] Girocco/Util.pm: use integer value of $! in noFatalsToBrowser The default value of "$!" is a string which is not at all helpful when trying to pass that to the "exit" function. Force it into a numeric context by using (0+$!) to get the proper integer to pass to the exit function. Signed-off-by: Kyle J. McKay --- Girocco/Util.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Girocco/Util.pm b/Girocco/Util.pm index c23f641..78bc55a 100644 --- a/Girocco/Util.pm +++ b/Girocco/Util.pm @@ -991,7 +991,7 @@ sub noFatalsToBrowser { undef *CORE::GLOBAL::die; *CORE::GLOBAL::die = sub { no warnings; - my $ec = $! || ($? >> 8) || 255; + my $ec = (0+$!) || ($? >> 8) || 255; my (undef, $fn, $li) = caller(0); my $loc = " at " . $fn . " line " . $li . ".\n"; my $msg = ""; -- 2.11.4.GIT