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

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

Thread Previous
November 24, 2016 07:19
Re: [perl #129345] perlmod doc bug wrt package scope
Message ID:
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 <>

> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About