From 8ef12d134e0a21c289796207d87244ba5f5ec92c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Mon, 12 Sep 2022 10:43:16 +0100
Subject: [PATCH] Use return value of eval instead of assigning inside string

---
 src/backend/catalog/Catalog.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
index 919a828ca7..41bbabdfee 100644
--- a/src/backend/catalog/Catalog.pm
+++ b/src/backend/catalog/Catalog.pm
@@ -315,7 +315,7 @@ sub ParseData
 					# We're treating the input line as a piece of Perl, so we
 					# need to use string eval here. Tell perlcritic we know what
 					# we're doing.
-					eval "\$hash_ref = $_"; ## no critic (ProhibitStringyEval)
+					$hash_ref = eval $_;    ## no critic (ProhibitStringyEval)
 					if (!ref $hash_ref)
 					{
 						die "$input_file: error parsing line $.:\n$_\n";
@@ -361,7 +361,7 @@ sub ParseData
 		# the whole file at once.
 		local $/;
 		my $full_file = <$ifd>;
-		eval "\$data = $full_file"    ## no critic (ProhibitStringyEval)
+		$data = eval $full_file    ## no critic (ProhibitStringyEval)
 		  or die "error parsing $input_file\n";
 		foreach my $hash_ref (@{$data})
 		{
-- 
2.34.1

