From: Rafael Garcia-Suarez Date: Sat, 21 Nov 2009 19:01:05 +0000 (+0100) Subject: Add new warning introduced by last patch in perldiag. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0b98bec9fd8d0513cb1904db85614d287298f7f8;p=p5sagit%2Fp5-mst-13.2.git Add new warning introduced by last patch in perldiag. --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index c46927c..42fe77e 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4783,6 +4783,11 @@ to access the filehandle slot within a typeglob. operator. Since C always tries to match the pattern repeatedly, the C has no effect. +=item Use of "goto" to jump into a construct is deprecated + +(D deprecated) Using C 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 subroutines diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index fe2a885..1e716af 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 or C 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 loop. It also can't be used to go into a -construct that is optimized away, +construct that is optimized away. The C form is quite different from the other forms of C. In fact, it isn't a goto in the normal sense at all, and