From 9689922a0d936b04feb418fbaf4c1420f745ea58 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 24 Apr 2017 11:17:18 +1000 Subject: [PATCH] 4606. [port] Stop using experimental "Experimental keys on scalar" feature of perl as it has been removed. [RT #45012] (cherry picked from commit a14562e120a824caa7f9c11f24c4c50fbd873fe2) --- CHANGES | 3 +++ bin/tests/system/statschannel/server-json.pl | 8 ++++---- bin/tests/system/statschannel/server-xml.pl | 2 +- bin/tests/system/statschannel/traffic-json.pl | 8 ++++---- bin/tests/system/statschannel/traffic-xml.pl | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 3a32ecc831..122601cfb8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4606. [port] Stop using experimental "Experimental keys on scalar" + feature of perl as it has been removed. [RT #45012] + 4604. [bug] Don't use ERR_load_crypto_strings() when building with OpenSSL 1.1.0. [RT #45117] diff --git a/bin/tests/system/statschannel/server-json.pl b/bin/tests/system/statschannel/server-json.pl index 95727d7071..abfdd9a230 100644 --- a/bin/tests/system/statschannel/server-json.pl +++ b/bin/tests/system/statschannel/server-json.pl @@ -16,15 +16,15 @@ my $text = do{local$/;}; close(INPUT); my $ref = decode_json($text); -foreach $key (keys $ref->{opcodes}) { +foreach $key (keys %{$ref->{opcodes}}) { print "opcode " . $key . ": " . $ref->{opcodes}->{$key} . "\n"; } -foreach $key (keys $ref->{rcodes}) { +foreach $key (keys %{$ref->{rcodes}}) { print "rcode " . $key . ": " . $ref->{rcodes}->{$key} . "\n"; } -foreach $key (keys $ref->{qtypes}) { +foreach $key (keys %{$ref->{qtypes}}) { print "qtype " . $key . ": " . $ref->{qtypes}->{$key} . "\n"; } -foreach $key (keys $ref->{nsstats}) { +foreach $key (keys %{$ref->{nsstats}}) { print "nsstat " . $key . ": " . $ref->{nsstats}->{$key} . "\n"; } diff --git a/bin/tests/system/statschannel/server-xml.pl b/bin/tests/system/statschannel/server-xml.pl index 1e4f72a5cc..c73e47cf2d 100644 --- a/bin/tests/system/statschannel/server-xml.pl +++ b/bin/tests/system/statschannel/server-xml.pl @@ -14,7 +14,7 @@ use XML::Simple; my $ref = XMLin("xml.stats"); my $counters = $ref->{server}->{counters}; foreach $group (@$counters) { - foreach $key (keys $group->{counter}) { + foreach $key (keys %{$group->{counter}}) { print $group->{type} . " " . $key . ": ". $group->{counter}->{$key}->{content} . "\n"; } } diff --git a/bin/tests/system/statschannel/traffic-json.pl b/bin/tests/system/statschannel/traffic-json.pl index 81ae6f4e31..c64c7b48d5 100644 --- a/bin/tests/system/statschannel/traffic-json.pl +++ b/bin/tests/system/statschannel/traffic-json.pl @@ -21,24 +21,24 @@ my $ref = decode_json($text); my $tcprcvd = $ref->{traffic}->{"dns-tcp-requests-sizes-received-ipv4"}; my $type = "tcp request-size "; -foreach $key (keys $tcprcvd) { +foreach $key (keys %{$tcprcvd}) { print $type . $key . ": ". $tcprcvd->{$key} ."\n"; } my $tcpsent = $ref->{traffic}->{"dns-tcp-responses-sizes-sent-ipv4"}; my $type = "tcp response-size "; -foreach $key (keys $tcpsent) { +foreach $key (keys %{$tcpsent}) { print $type . $key . ": ". $tcpsent->{$key} ."\n"; } my $udprcvd = $ref->{traffic}->{"dns-udp-requests-sizes-received-ipv4"}; my $type = "udp request-size "; -foreach $key (keys $udprcvd) { +foreach $key (keys %{$udprcvd}) { print $type . $key . ": ". $udprcvd->{$key} ."\n"; } my $udpsent = $ref->{traffic}->{"dns-udp-responses-sizes-sent-ipv4"}; my $type = "udp response-size "; -foreach $key (keys $udpsent) { +foreach $key (keys %{$udpsent}) { print $type . $key . ": ". $udpsent->{$key} ."\n"; } diff --git a/bin/tests/system/statschannel/traffic-xml.pl b/bin/tests/system/statschannel/traffic-xml.pl index cd1714fce3..d8288e1913 100644 --- a/bin/tests/system/statschannel/traffic-xml.pl +++ b/bin/tests/system/statschannel/traffic-xml.pl @@ -22,7 +22,7 @@ foreach $group (@$udp) { if (exists $group->{counter}->{name}) { print $type . $group->{counter}->{name} . ": " . $group->{counter}->{content} . "\n"; } else { - foreach $key (keys $group->{counter}) { + foreach $key (keys %{$group->{counter}}) { print $type . $key . ": ". $group->{counter}->{$key}->{content} ."\n"; } } @@ -34,7 +34,7 @@ foreach $group (@$tcp) { if (exists $group->{counter}->{name}) { print $type . $group->{counter}->{name} . ": " . $group->{counter}->{content} . "\n"; } else { - foreach $key (keys $group->{counter}) { + foreach $key (keys %{$group->{counter}}) { print $type . $key . ": ". $group->{counter}->{$key}->{content} ."\n"; } }