develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [perl #129345] perlmod doc bug wrt package scope

Thread Previous
From:
andy.glew
Date:
November 24, 2016 07:19
Subject:
Re: [perl #129345] perlmod doc bug wrt package scope
Message ID:
CAFjhD7L3RERSVO7FrZou=FV5QswO3C2N99KLcX-65=o8CzL=7A@mail.gmail.com
Fair enough - package and my (and probably other, like our, etc.) start new
nested scopes, and remain in scope until their scope ends.

Q: is there anywhere mentioned what things end such a scope?

The only things that I am aware of are } and file boundaries.

On Sat, Sep 24, 2016 at 2:57 PM, Zefram via RT <perlbug-followup@perl.org>
wrote:

> via RT wrote:
> >Does not mention that package scope ends at next package statement.
>
> It doesn't: the next package statement produces a nested package scope.
> The two scopes happen to have the same end point, so it's just a bit
> difficult to discern.
>
> >my() variable scopes cross package statement boundaries.
>
> Nested again.  You have a package scope inside a my scope inside a
> package scope.
>
> -zefram
>
>
>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About