I think not, as with AUTOLOAD, you mostly leave the current scope and enter the scope of the target subroutine:

use strict; use Carp qw(croak); use vars qw($AUTOLOAD); my %handler = ( hello => sub { print "Hello World\n" }, ); sub AUTOLOAD { (my $fn = $AUTOLOAD) =~ s/.*:://g; if (exists $handler{ $fn }) { goto &{ $handler{ $fn } } }; croak "Unknown method '$AUTOLOAD' called."; }; hello();

In the above example, we only leave enclosed scopes and don't goto into an inner scope. Potentially (but I can't test this currently, due to lack of a 5.12), the following could fall under "goto into an inner scope", but I think it's not really into in this case:

use strict; use Carp qw(croak); use vars qw($AUTOLOAD); sub AUTOLOAD { (my $fn = $AUTOLOAD) =~ s/.*:://g; my %handler = ( hello => sub { print "Hello World\n" }, ); if (exists $handler{ $fn }) { goto &{ $handler{ $fn } } }; croak "Unknown method '$AUTOLOAD' called."; }; hello();

Here, the handlers are arguably in an inner scope, relative to AUTOLOAD. But what I think the change note really means is that jumping "into (the middle of) an inner scope" is deprecated:

START: goto INSIDE; OUTSIDE: if (0) { INSIDE: print "Hello "; INSIDE2: print "World\n"; };

Here, I think the labels INSIDE and INSIDE2 are not reachable from START (or rather, reaching them is deprecated with 5.12), while OUTSIDE is reachable.

AUTOLOAD subroutines are not affected by that, unless you goto into the body of such a subroutine by holding onto a label within that subroutine, but that's not related to AUTOLOAD:

my $handler = sub { INSIDE: print "Hello "; INSIDE2: print "World\n"; }; goto INSIDE; # deprecated goto INSIDE2; # deprecated goto &$handler; # still works, as we start "just on the outside" of $h +andler

In reply to Re^2: Perl 5.12.0 has been released! by Corion
in thread Perl 5.12.0 has been released! by ikegami

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.