From 0c728b204118ba8d830852b8c0d31fd93f0e89ca Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 8 Nov 2017 17:20:21 +0100 Subject: [PATCH] TT#24097 Localize %ENV variable assignments While these instances are a bit pointless as they are assigned on the file scope, and this is something that should be allowed by perlcritic. Let's just do this, which does no harm, so that we can catch other problematic cases. Change-Id: I674b1374a62fa976e20a3fedf356ae6d4848a796 --- tests/simulator-ng.pl | 2 +- tests/simulator-udp.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/simulator-ng.pl b/tests/simulator-ng.pl index 2eab8515e..0c17aa910 100755 --- a/tests/simulator-ng.pl +++ b/tests/simulator-ng.pl @@ -46,7 +46,7 @@ GetOptions( ($IP || $IPV6) or die("at least one of --local-ip or --local-ipv6 must be given"); -$SIG{ALRM} = sub { print "alarm!\n"; }; +local $SIG{ALRM} = sub { print "alarm!\n"; }; setrlimit(RLIMIT_NOFILE, 8000, 8000); $PROTOS and $PROTOS = [split(/\s*[,;:]+\s*/, $PROTOS)]; diff --git a/tests/simulator-udp.pl b/tests/simulator-udp.pl index 035cbd1f6..5ae170a8a 100755 --- a/tests/simulator-udp.pl +++ b/tests/simulator-udp.pl @@ -23,7 +23,7 @@ GetOptions( ($IP || $IPV6) or die("at least one of --local-ip or --local-ipv6 must be given"); -$SIG{ALRM} = sub { print "alarm!\n"; }; +local $SIG{ALRM} = sub { print "alarm!\n"; }; setrlimit(RLIMIT_NOFILE, 8000, 8000); my @chrs = ('a' .. 'z', 'A' .. 'Z', '0' .. '9');