On Thu, Nov 14, 2002 at 04:28:17AM +0200, [EMAIL PROTECTED] wrote:
:  > 
:  > : will  it be an error to declare it as "our $_" ; 
:  > 
:  > No, in this case, $_ is still considered a lexical, but it just happens
:  > to be aliased to a variable in the current package.
:  > 
: 
: which variable ? it seems that "our $_" is something like that (???)
: 
: my $_ # implicit -- at the beginning of file ( or actually any other
:       # lexical scope
: . 
: .
: .
: our $_ ; # translated to : our $Main::_ := $_ ; 

No, that's backwards.

: .        # or $_ := $Main::_ 

More like that, except a new lexical name is introduced as with "my".

: ( i have in mind that "our $thing " is something like this : "dont
: worry , $thing is variable from current package ) 

Well, it has that effect, but it does so by pretending it's a lexical.

: but that would be strange , because I thaought that my/our manipulate
: names in symbol-table , while aliasing is compleatly orthogonal to
: that. or "our $_" is just special case with perl making additional
: magic . 

No special magic.  For any variable, saying

    package P;
    our $foo;

is very much like

    my $foo ::= $P::foo

Larry

Reply via email to