in reply to Re: Re: Setting lexicals in a BEGIN block.
in thread Setting lexicals in a BEGIN block.

It's better to say that it isn't scoped at all. All the vars pragma does is, after some checking of arguments, is using the fully qualified variable in a dummy statement. There is no scoping involved.

Abigail

Replies are listed 'Best First'.
Re: Re: Setting lexicals in a BEGIN block.
by Anonymous Monk on Jun 21, 2002 at 10:30 UTC
    By package scoped I mean that unqualified use of a variable declared with use vars qw($foo) follows package boundaries: 1) unqualified use of $foo is not allowed inside another package (even in the same file as the declaration), and 2) unqualified use of $foo is allowed anywhere within the same package (even in different files from the declaration).