pc88mxer has asked for the wisdom of the Perl Monks concerning the following question:
For instance, in the following example, I'd like to raise an error when $a::z is accessed.
Preferably I'd like to know at compile time, but run time would be fine. Is there a way to do this?
package a; our $x = 1; package main; print "a::x = ", $a::x, "\n"; # Fine print "a::z = ", $a::z, "\n"; # want to raise error here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catch references to undefined variables in other modules? (export)
by tye (Sage) on Oct 29, 2007 at 21:50 UTC | |
by Anonymous Monk on Oct 31, 2007 at 16:52 UTC | |
by tye (Sage) on Oct 31, 2007 at 17:00 UTC | |
|
Re: Catch references to undefined variables in other modules?
by jettero (Monsignor) on Oct 29, 2007 at 17:17 UTC | |
|
Re: Catch references to undefined variables in other modules?
by toolic (Bishop) on Oct 29, 2007 at 17:05 UTC | |
by pc88mxer (Vicar) on Oct 29, 2007 at 17:22 UTC |