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

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
From:
Linda W
Date:
July 6, 2012 01:30
Subject:
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
4FF6A20C.3030901@tlinx.org



` Eric Brine via RT wrote:
> On Fri, Jul 6, 2012 at 3:04 AM, Eric Brine <ikegami@adaelis.com> wrote:
>
>   
>> On Fri, Jul 6, 2012 at 1:48 AM, Linda W <perl-diddler@tlinx.org> 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


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