It's somewhat safer if you use @EXPORT_OK rather than @EXPORT and make the caller explicitly use PackVar qw( $Test ) to get the variable in their namespace. That also documents where $Test is coming from in the using code.
But seconded on the recommendation to prefer fully qualified names; if I don't I make sure to use the explicit import (then again I almost always use an explicit import list for subs as well . . .).
In reply to Re^2: Access to (exported?) variabes of a module
by Fletch
in thread Access to (exported?) variabes of a module
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |