summaryrefslogtreecommitdiff
path: root/t/op/array.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-13 15:16:16 +0100
committerJesse Vincent <jesse@bestpractical.com>2009-10-16 12:30:15 -0400
commit136c2a5ed8214b1a6791e11379cbee1edd6c291c (patch)
tree915710e4db5b8960bed5263a1e7d4a7c130dfe62 /t/op/array.t
parent2a70d4f61c76d61d938271d96ddac9f5537a132b (diff)
downloadperl-136c2a5ed8214b1a6791e11379cbee1edd6c291c.tar.gz
Bracket deprecated features with no warnings 'deprecated';
Diffstat (limited to 't/op/array.t')
-rw-r--r--t/op/array.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/array.t b/t/op/array.t
index 74539a83c3..0027f4babf 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -21,6 +21,9 @@ is($tmp, 5);
is($#ary, 3);
is(join('',@ary), '1234');
+{
+ no warnings 'deprecated';
+
$[ = 1;
@ary = (1,2,3,4,5);
is(join('',@ary), '12345');
@@ -70,6 +73,8 @@ $bar[2] = '2';
$r = join(',', $#bar, @bar);
is($r, "2,0,,2");
+}
+
$foo = 'now is the time';
ok(scalar (($F1,$F2,$Etc) = ($foo =~ /^(\S+)\s+(\S+)\s*(.*)/)));
is($F1, 'now');
@@ -119,7 +124,10 @@ $foo = ('a','b','c','d','e','f')[1];
is($foo, 'b');
@foo = ( 'foo', 'bar', 'burbl');
-push(foo, 'blah');
+{
+ no warnings 'deprecated';
+ push(foo, 'blah');
+}
is($#foo, 3);
# various AASSIGN_COMMON checks (see newASSIGNOP() in op.c)
@@ -252,6 +260,7 @@ is ($foo[1], "a");
sub tary {
+ no warnings 'deprecated';
local $[ = 10;
my $five = 5;
is ($tary[5], $tary[$five]);