Chris Ochs wrote:
Will this work to undefine everything in package Test ?
sub ClearGlobals {
my $globalspace = "Test";
foreach (keys %{"${globalspace}::"}) {
unless ($_ eq 'dbh') { ## Don't undef the cached database handle!
local *symbol = "${globalspace}::${_}";
undef $symbol
Will this work to undefine everything in package Test ?
sub ClearGlobals {
my $globalspace = "Test";
foreach (keys %{"${globalspace}::"}) {
unless ($_ eq 'dbh') { ## Don't undef the cached database handle!
local *symbol = "${globalspace}::${_}";
undef $symbol;
undef @sym