From: Nicholas Clark Date: Tue, 13 Oct 2009 14:26:32 +0000 (+0100) Subject: Tests for barewords and hash operators need no warnings 'deprecated'; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb81740c724e07e132ae8122503daaf89eba703b;p=p5sagit%2Fp5-mst-13.2.git Tests for barewords and hash operators need no warnings 'deprecated'; --- diff --git a/t/op/each.t b/t/op/each.t index 02438f2..765bfda 100644 --- a/t/op/each.t +++ b/t/op/each.t @@ -106,16 +106,22 @@ isnt ($size, (split('/', scalar %hash))[1]); is (keys(%hash), 10, "keys (%hash)"); -is (keys(hash), 10, "keys (hash)"); +{ + no warnings 'deprecated'; + is (keys(hash), 10, "keys (hash)"); +} $i = 0; %h = (a => A, b => B, c=> C, d => D, abc => ABC); -@keys = keys(h); -@values = values(h); -while (($key, $value) = each(h)) { +{ + no warnings 'deprecated'; + @keys = keys(h); + @values = values(h); + while (($key, $value) = each(h)) { if ($key eq $keys[$i] && $value eq $values[$i] && $key eq lc($value)) { $i++; } + } } is ($i, 5);