develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
Linda W
July 6, 2012 01:30
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:

` Eric Brine via RT wrote:
> On Fri, Jul 6, 2012 at 3:04 AM, Eric Brine <> wrote:
>> On Fri, Jul 6, 2012 at 1:48 AM, Linda W <> wrote:
>>> **
>>>   With state both are physically scoped as well, though my is also
>>> dynamically scoped.
>> No, state, my and our are not dynamically scoped. They are lexically
>> scoped: They can only be seen in the current lexical scope.
  'my' has dynamic scope in the it goes away at end of the physical 
boundaries (sans any references to it).
It also dynamically is created when you enter the physical boundaries of 
it's lexical scope.  It's a new var at that point. 

Such isn't true with state or our.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About