From 39bfe5ffac6be8bd573e749eabc72042c1eede77 Mon Sep 17 00:00:00 2001
From: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Date: Tue, 29 Oct 2019 10:09:52 +0000
Subject: [PATCH] Corrected previous commit as per tonyc's suggestion

---
 lib/POE/Kernel.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/POE/Kernel.pm b/lib/POE/Kernel.pm
index 2d7e400..27781f9 100644
--- a/lib/POE/Kernel.pm
+++ b/lib/POE/Kernel.pm
@@ -365,7 +365,8 @@ BEGIN {
     no strict 'refs';
     local $^W = 0;
     local $SIG{__WARN__} = sub { }; # redefine
-    *$const = sub () { return $value };
+    my $tmp = $value;
+    *$const = sub () { $tmp };
   }
 
   # TRACE_FILENAME is special.
-- 
2.1.4

