in reply to Catch references to undefined variables in other modules?
The best practice is:
use a qw( $x $z );
which produces, at compile time (for a properly written a.pm):
"$z" is not exported by the a module Can't continue after import errors at -e line 1
Here is the example a.pm I used:
package a; require Exporter; *import= \&Exporter::import; our @EXPORT_OK= qw( $x ); our $x= 'x'; 1;
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catch references to undefined variables in other modules? (export)
by Anonymous Monk on Oct 31, 2007 at 16:52 UTC | |
by tye (Sage) on Oct 31, 2007 at 17:00 UTC |