diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2014-05-10 00:04:58 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-06-04 15:21:08 +1000 |
commit | b5adc3e5c5c4fa9a0d3b230a000a7644b71a169f (patch) | |
tree | 1089105ef847a284ea7b9ab3b9d04351f7cf86d2 /t/op/each.t | |
parent | 92c6a5ec9f11d991a91d37e304ca77f7a73aa1f9 (diff) | |
download | perl-b5adc3e5c5c4fa9a0d3b230a000a7644b71a169f.tar.gz |
Disallow omitting % and @ on hash and array names
Really old Perl let you omit the @ on array names and the % on hash
names in some spots. This has issued a deprecation warning since Perl
5.0, and is no longer permitted.
Diffstat (limited to 't/op/each.t')
-rw-r--r-- | t/op/each.t | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/t/op/each.t b/t/op/each.t index be8aa48815..4cfc03a6b2 100644 --- a/t/op/each.t +++ b/t/op/each.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 59; +plan tests => 57; $h{'abc'} = 'ABC'; $h{'def'} = 'DEF'; @@ -106,25 +106,6 @@ isnt ($size, (split('/', scalar %hash))[1]); 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); -{ - 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); - @tests = (&next_test, &next_test, &next_test); { package Obj; |