in reply to Common subs and Global Variables
What you're doing works in Linux and won't go away.
But once someone wants to introduce new namespaces via package or have better control which vars and subs are included, you'll likely run into problems.
PS: FWIW what you're doing is similar to "sourcing" in shell languages, and could already be done with do FILE instead of use ...
...and frankly I'm surprised you don't need a use lib "."; to allow modules in the local . dir
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Common subs and Global Variables
by hippo (Archbishop) on Mar 19, 2024 at 15:10 UTC | |
by cavac (Prior) on Mar 21, 2024 at 16:58 UTC |