On Tue, Sep 19, 2000 at 04:50:04PM -0700, Nathan Wiger wrote:
> Ilya Zakharevich wrote:
> >
> > On the other hand, there are only 5 names, not hundreds of them, and
> > they do not "get in the way", as ADD would do (prohibiting a method
> > named ADD). So letting them be may be also a solution...
>
> Uhhh, I think you should check the Camel. These variables certainly do
> get in the way, you can't create your own %ENV any more than you can
> create your own STORE without it drastically affecting your program.
The presence of a method STORE is visible outside of the module, and
may be &required* if the module follows some published (non-Perl) API.
Variables are of different ilk.
Say,
monk:~->perl -wle '@foo::ARGV = (1..5); print @ARGV'
Name "foo::ARGV" used only once: possible typo at -e line 1.
So you can have module variables with any names - @ARGV does not get
in the way of APIs.
> And as for "5 names", there are a few more than that:
>
> $a, $ACCUMULATOR, $^A, $ARG, $_, @ARG, @_, $ARGV,
> @ARGV, $b, $BASETIME, $^T, $CHILD_ERROR, $?,
You do not get these unless you request them. And they are not forced
into the current package, so do not matter much.
Ilya