Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Removing subroutines from symbol tables

by Steve_p (Priest)
on Nov 25, 2005 at 22:00 UTC ( #511755=note: print w/replies, xml ) Need Help??


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; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://511755]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-04-16 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?