To: perl5-porters@perl.org
Message-Id: <
200007101315.e6ADFrg21041@chthon.perl.com>
p4raw-id: //depot/cfgperl@6342
my $stem_symtab = *{$stem}{HASH};
return unless defined $stem_symtab and exists $stem_symtab->{$leaf};
- my $leaf_glob = $stem_symtab->{$leaf};
- my $leaf_symtab = *{$leaf_glob}{HASH};
+
+ # free all the symbols in the package
+
+ my $leaf_symtab = *{$stem_symtab->{$leaf}}{HASH};
+ foreach my $name (keys %$leaf_symtab) {
+ undef *{$pkg . $name};
+ }
+
+ # delete the symbol table
%$leaf_symtab = ();
delete $stem_symtab->{$leaf};