diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-13 15:25:03 +0100 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2009-10-16 12:30:15 -0400 |
commit | 96ccdd02f19e8749808107cd642a6001ab8033fc (patch) | |
tree | 9a2158027b08d97e4a3d29c125ce6d47f551d4b5 /t | |
parent | bb19cdcde94e10abb00ef5f784a633998ecc79a9 (diff) | |
download | perl-96ccdd02f19e8749808107cd642a6001ab8033fc.tar.gz |
do subname() is deprecated, so tests for it need no warnings 'deprecated';
Diffstat (limited to 't')
-rw-r--r-- | t/op/do.t | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -33,13 +33,19 @@ print "1..50\n"; # Test do &sub and proper @_ handling. $_[0] = 0; -$result = do foo1(1); +{ + no warnings 'deprecated'; + $result = do foo1(1); +} ok( $result eq 'value', ":$result: eq :value:" ); ok( $_[0] == 0 ); $_[0] = 0; -$result = do foo2(0,1,0); +{ + no warnings 'deprecated'; + $result = do foo2(0,1,0); +} ok( $result eq 'value', ":$result: eq :value:" ); ok( $_[0] == 0 ); @@ -50,10 +56,16 @@ sub blather { ok 1 foreach @_; } -do blather("ayep","sho nuff"); +{ + no warnings 'deprecated'; + do blather("ayep","sho nuff"); +} @x = ("jeepers", "okydoke"); @y = ("uhhuh", "yeppers"); -do blather(@x,"noofie",@y); +{ + no warnings 'deprecated'; + do blather(@x,"noofie",@y); +} unshift @INC, '.'; |