0e6cf4
From 3772892b334a631b7bbf9a8ffbcb19e327d96e29 Mon Sep 17 00:00:00 2001
0e6cf4
From: Ricardo Signes <rjbs@semiotic.systems>
0e6cf4
Date: Sat, 17 Jul 2021 14:46:10 -0400
0e6cf4
Subject: [PATCH] mitigate @INC pollution when loading ConfigLocal
0e6cf4
0e6cf4
---
0e6cf4
 Encode.pm | 4 ++--
0e6cf4
 1 file changed, 2 insertions(+), 2 deletions(-)
0e6cf4
0e6cf4
diff --git a/Encode.pm b/Encode.pm
0e6cf4
index a56a999..9691382 100644
0e6cf4
--- a/Encode.pm
0e6cf4
+++ b/Encode.pm
0e6cf4
@@ -65,8 +65,8 @@ require Encode::Config;
0e6cf4
 eval {
0e6cf4
     local $SIG{__DIE__};
0e6cf4
     local $SIG{__WARN__};
0e6cf4
-    local @INC = @INC || ();
0e6cf4
-    pop @INC if $INC[-1] eq '.';
0e6cf4
+    local @INC = @INC;
0e6cf4
+    pop @INC if @INC && $INC[-1] eq '.';
0e6cf4
     require Encode::ConfigLocal;
0e6cf4
 };
0e6cf4
 
0e6cf4
-- 
0e6cf4
2.30.1 (Apple Git-130)
0e6cf4