in reply to Re: undef Package;
in thread undef Package;
If you're using 5.004 or later (i think), then you just need to use Symbol
++! That's what I was looking for. Fortunately, it's in the core distribution.
It seems I was very close:
But Symbol does a bit more than I did:# from Symbol.pm # free all the symbols in the package my $leaf_symtab = *{$stem_symtab->{$leaf}}{HASH}; foreach my $name (keys %$leaf_symtab) { undef *{$pkg . $name}; }
Which I didn't do, because it seemed that it didn't work at all. However, it probably didn't work in an rmdir way: there were still symbols in the table. (rmdir doesn't delete non-empty directories)# delete the symbol table %$leaf_symtab = (); delete $stem_symtab->{$leaf};
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk
|
|---|