in reply to examining other package's variable without 'use'

Define an import sub, and use caller in the import sub to find which package called you. Given the package name, you can access the variable, once you turn off strictness.

Note that your programming style is widely regarded as bad style. Some maintainance programmer will come along, see the assignment to the special variable in the calling package, without seeing the variable used, and she will delete the assignment. The program will then mysteriously break. This is using global variables in one of the worst ways imaginable. You should consider either passing the data to the used package when doing the use statement, or by setting a variable in the used package.

Abigail

Replies are listed 'Best First'.
Re^2: examining other package's variable without 'use' (rant)
by Aristotle (Chancellor) on May 10, 2003 at 21:31 UTC
    On a tangent, that's exactly why Exporter's interface sucks. That it's well documented and widely known does not make it any better.

    Makeshifts last the longest.