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

Re: [perl #113974] package NAMESPACE manpage comments

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 6, 2012 00:04
Subject:
Re: [perl #113974] package NAMESPACE manpage comments
Message ID:
CALJW-qG-bxu3mAdy2VYtqDAhcwpimwP7RZJpiygAY3RusgQm1Q@mail.gmail.com
On Fri, Jul 6, 2012 at 1:48 AM, Linda W <perl-diddler@tlinx.org> wrote:

> **
>
>  "our" variables are available by short name in the enclosing lexical scope.
>
>
>  How do you get from physical scoping to the word lexical which means "of
> the grammar or language?...Tried to look up derivation of lexical, and I
> don't see the relation to it's original meaning... almost like someone used
> it not knowing the.
>

http://en.wikipedia.org/wiki/Scope_%28computer_science%29#Lexical_scoping_and_dynamic_scoping


> In this case it is a physical scoping vs. a logical scoping.
>

huh? There's no such thing


> 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.

- Eric

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