http://qs1969.pair.com?node_id=1199633

jnorden has asked for the wisdom of the Perl Monks concerning the following question:

The current documentation for 'vars' says: "...this pragma has been superseded by our declarations,..."

This doesn't seem quite right to me. Consider the following case. Suppose a project is small enough that I want to keep it all in one file. But it is split into two packages, mostly to have separate namespaces for two different tasks. (Maybe one package prints a web form, the other one processes it's submissions.) Now say that I want to 'use strict'. If I declare the the variables with 'our', that defeats the namespace-separating purpose of using packages. Using 'my' would only work if each package was inside its own {block}, making the packages superfluous. Worse, there is no way for packages FOO and BAR to communicate via $FOO::this and $BAR::that if $this and $that are 'my' variables.

I don't see an alternative to 'use vars' for this. Am I missing something?