In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d1e5937230211e026f2fb79c9c655555e94ff6b9?hp=1ba5047658911b794bcf8594a8788f49f4d58d4a>
- Log ----------------------------------------------------------------- commit d1e5937230211e026f2fb79c9c655555e94ff6b9 Author: Rafael Garcia-Suarez <[email protected]> Date: Wed Feb 20 16:58:55 2013 +0100 Perldelta note for undeprecating my $_ M pod/perldelta.pod commit b09f87dd777efa69f72c37f5f314fee6cfde3637 Author: Rafael Garcia-Suarez <[email protected]> Date: Tue Feb 19 15:53:10 2013 +0100 Un-deprecate the support for lexical $_ M op.c M pod/perldiag.pod M t/lib/warnings/9uninit M t/lib/warnings/op ----------------------------------------------------------------------- Summary of changes: op.c | 7 ------- pod/perldelta.pod | 2 ++ pod/perldiag.pod | 12 ------------ t/lib/warnings/9uninit | 3 +-- t/lib/warnings/op | 14 -------------- 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/op.c b/op.c index c9a1b53..1d676c4 100644 --- a/op.c +++ b/op.c @@ -578,13 +578,6 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags) PL_parser->in_my == KEY_state ? "state" : "my"), flags & SVf_UTF8); } } - else if (len == 2 && name[1] == '_' && !is_our) - /* diag_listed_as: Use of my $_ is deprecated */ - Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), - "Use of %s $_ is deprecated", - PL_parser->in_my == KEY_state - ? "state" - : "my"); /* allocate a spare slot and store the name in that slot */ diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 06e180a..1f71ddf 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -49,6 +49,8 @@ This release reverts that change. =head1 Deprecations +The premature deprecation of lexical $_ in 5.17.7 has been reverted. + =head2 Deprecated pragma =over diff --git a/pod/perldiag.pod b/pod/perldiag.pod index c5fdbb6..9ec4446 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -5702,12 +5702,6 @@ old way has bad side effects. it already went past any symlink you are presumably trying to look for. The operation returned C<undef>. Use a filename instead. -=item Use of my $_ is deprecated - -(D deprecated) Lexical $_ is deprecated because of -its confusing side-effects. Consider using C<local $_> -instead. See the explanation under L<perlvar/$_>. - =item Use of %s on a handle without * is deprecated (D deprecated) You used C<tie>, C<tied> or C<untie> on a scalar but that scalar @@ -5739,12 +5733,6 @@ C<$array[0+$ref]>. This warning is not given for overloaded objects, however, because you can overload the numification and stringification operators and then you presumably know what you are doing. -=item Use of state $_ is deprecated - -(D deprecated) Lexical $_ is deprecated because of -its confusing side-effects. Consider using C<local $_> -instead. See the explanation under L<perlvar/$_>. - =item Use of tainted arguments in %s is deprecated (W taint, deprecated) You have supplied C<system()> or C<exec()> with multiple diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index c34c22f..fb9a487 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -787,7 +787,7 @@ s/$m1/$g1/; undef $_; tr/x/y/; undef $_; tr/x/y/r; undef $_; -my $_; + /y/; /$m1/; /$g1/; @@ -820,7 +820,6 @@ undef $g1; $m1 = '$g1'; $foo =~ s//$m1/ee; EXPECT -Use of my $_ is deprecated at - line 16. Use of uninitialized value $_ in pattern match (m//) at - line 5. Use of uninitialized value $m1 in regexp compilation at - line 6. Use of uninitialized value $_ in pattern match (m//) at - line 6. diff --git a/t/lib/warnings/op b/t/lib/warnings/op index d8e43d7..3e9ea41 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -1,8 +1,5 @@ op.c AOK - Use of my $_ is deprecated - my $_ ; - Found = in conditional, should be == 1 if $a = 1 ; @@ -107,17 +104,6 @@ __END__ # op.c -use warnings 'deprecated' ; -my $_; -CORE::state $_; -no warnings 'deprecated' ; -my $_; -CORE::state $_; -EXPECT -Use of my $_ is deprecated at - line 3. -Use of state $_ is deprecated at - line 4. -######## -# op.c use warnings 'syntax' ; 1 if $a = 1 ; 1 if $a -- Perl5 Master Repository
