summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-11-21 20:01:05 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-11-21 20:01:05 +0100
commit0b98bec9fd8d0513cb1904db85614d287298f7f8 (patch)
treeae92c3c95e700891c0103b3807def9d131c725a8
parentb500e03bf95eb884a53407409b4e755d303171a4 (diff)
downloadperl-0b98bec9fd8d0513cb1904db85614d287298f7f8.tar.gz
Add new warning introduced by last patch in perldiag.
-rw-r--r--pod/perldiag.pod5
-rw-r--r--pod/perlfunc.pod4
2 files changed, 7 insertions, 2 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index c46927c18b..42fe77ecee 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4783,6 +4783,11 @@ to access the filehandle slot within a typeglob.
operator. Since C<split> always tries to match the pattern
repeatedly, the C</g> has no effect.
+=item Use of "goto" to jump into a construct is deprecated
+
+(D deprecated) Using C<goto> to jump from an outer scope into an inner
+scope is deprecated and should be avoided.
+
=item Use of inherited AUTOLOAD for non-method %s() is deprecated
(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index fe2a8850c7..1e716af090 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2409,10 +2409,10 @@ necessarily recommended if you're optimizing for maintainability:
goto ("FOO", "BAR", "GLARCH")[$i];
Use of C<goto-LABEL> or C<goto-EXPR> to jump into a construct is
-deprecated and will issue a warning. Even then it may not be used to
+deprecated and will issue a warning. Even then, it may not be used to
go into any construct that requires initialization, such as a
subroutine or a C<foreach> loop. It also can't be used to go into a
-construct that is optimized away,
+construct that is optimized away.
The C<goto-&NAME> form is quite different from the other forms of
C<goto>. In fact, it isn't a goto in the normal sense at all, and