http://qs321.pair.com?node_id=511755


in reply to Removing subroutines from symbol tables

Rather than blasting the entire glob, couldn't you just blast away the CV* inside the glob.

#!/usr/bin/perl -w use Inline C; use Devel::Peek; sub foo{1;} *{main::Foo} = \&foo; print Dump *Foo; clear_cv(*Foo); print Dump *Foo; __END__ __C__ void clear_cv(SV* gv) { if(SvTYPE(gv) == SVt_PVGV) { GvCV(gv) = Nullcv; } }