diff options
author | Bo Borgerson <gigabo@gmail.com> | 2009-08-26 09:47:33 -0400 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2009-09-13 20:16:17 +0200 |
commit | a6d8037e26aaceac1a62ab1a36249ff12386c7ff (patch) | |
tree | 8698c6eca6a90d3b477aff15d1ba3c8b8f4cfd02 /t | |
parent | d681dfadbe84f87244e6602d414cdb00dce19f95 (diff) | |
download | perl-a6d8037e26aaceac1a62ab1a36249ff12386c7ff.tar.gz |
split: Remove implicit split to @_
Remove the long deprecated feature where split in scalar context writes to @_
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/op | 22 | ||||
-rw-r--r-- | t/re/pat.t | 4 | ||||
-rw-r--r-- | t/run/fresh_perl.t | 4 |
3 files changed, 4 insertions, 26 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 681ec16297..0891bd8bbb 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -3,12 +3,6 @@ Found = in conditional, should be == 1 if $a = 1 ; - Use of implicit split to @_ is deprecated - split ; - - Use of implicit split to @_ is deprecated - $a = split ; - Useless use of time in void context Useless use of a variable in void context Useless use of a constant in void context @@ -112,22 +106,6 @@ EXPECT Found = in conditional, should be == at - line 3. ######## # op.c -use warnings 'deprecated' ; -split ; -no warnings 'deprecated' ; -split ; -EXPECT -Use of implicit split to @_ is deprecated at - line 3. -######## -# op.c -use warnings 'deprecated' ; -$a = split ; -no warnings 'deprecated' ; -$a = split ; -EXPECT -Use of implicit split to @_ is deprecated at - line 3. -######## -# op.c use warnings 'deprecated'; my (@foo, %foo); %main::foo->{"bar"}; diff --git a/t/re/pat.t b/t/re/pat.t index 4f4c6f318e..f84e07f1e2 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -2386,8 +2386,8 @@ sub run_tests { local $Message = "(??{ .. }) in split doesn't corrupt its stack"; our $i; ok '-1-3-5-' eq join '', split /((??{$i++}))/, '-1-3-5-'; - no warnings 'deprecated', 'syntax'; - split /(?{'WOW'})/, 'abc'; + no warnings 'syntax'; + @_ = split /(?{'WOW'})/, 'abc'; local $" = "|"; iseq "@_", "a|b|c"; } diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index ce9ad5a117..f22e170fc6 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -57,7 +57,7 @@ foreach my $prog (@prgs) { __END__ ######## -$a = ":="; split /($a)/o, "a:=b:=c"; print "@_" +$a = ":="; @_ = split /($a)/o, "a:=b:=c"; print "@_" EXPECT a := b := c ######## @@ -345,7 +345,7 @@ map {#this newline here tickles the bug $s += $_} (1,2,4); print "eat flaming death\n" unless ($s == 7); ######## -sub foo { local $_ = shift; split; @_ } +sub foo { local $_ = shift; @_ = split; @_ } @x = foo(' x y z '); print "you die joe!\n" unless "@x" eq 'x y z'; ######## |