Silence perl warning in check-world
In some older versions of perl (like v5.10), I get a warning that:
Use of implicit split to @_ is deprecated at src/test/recovery/t/
006_logical_decoding.pl line 26.
Splitting into a dummy variable silences that warning, as in the attached.
There may be a better way to silence the warning. (Presumably it actually
is clobbering @_ in those older versions of Perl, but that doesn't seem to
cause problems in this particular case.)
Cheers,
Jeff
Attachments:
silence_perl_warning.patchapplication/octet-stream; name=silence_perl_warning.patchDownload
diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl
index 1716360..6a38c9e 100644
--- a/src/test/recovery/t/006_logical_decoding.pl
+++ b/src/test/recovery/t/006_logical_decoding.pl
@@ -23,7 +23,7 @@ $node_master->safe_psql('postgres', qq[INSERT INTO decoding_test(x,y) SELECT s,
# Basic decoding works
my($result) = $node_master->safe_psql('postgres', qq[SELECT pg_logical_slot_get_changes('test_slot', NULL, NULL);]);
-is(scalar(split /^/m, $result), 12, 'Decoding produced 12 rows inc BEGIN/COMMIT');
+is(scalar(my @foobar=split /^/m, $result), 12, 'Decoding produced 12 rows inc BEGIN/COMMIT');
# If we immediately crash the server we might lose the progress we just made
# and replay the same changes again. But a clean shutdown should never repeat
On 3/13/17 16:51, Jeff Janes wrote:
In some older versions of perl (like v5.10), I get a warning that:
Use of implicit split to @_ is deprecated at
src/test/recovery/t/006_logical_decoding.pl
<http://006_logical_decoding.pl> line 26.Splitting into a dummy variable silences that warning, as in the
attached. There may be a better way to silence the warning.
(Presumably it actually is clobbering @_ in those older versions of
Perl, but that doesn't seem to cause problems in this particular case.)
committed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers