On Sun, 7 May 2000, Richard Chen wrote:
> Instead of the line
> undef &$fullname;
> which undef's the source subroutine, one should use
> *{$fullname}=sub {};
ah, good trick! this also solves the problem for aliased
arrays/hashes/scalars
> This fix is obvious because that is the way how a code alias is
> generated in the first place. In order to undef this alias,
> just let it point to an anonymous subroutine which does nothing.
>
> Since this does not involve B.pm, it is more efficient than
yeah, i didn't like pulling in B.pm, but it was a quick hack,
flush_namespace should have been written in c to begin with. i've
modified the Perl version for now (in cvs) to use your suggestion and drop
B.pm.