Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: undefing *foo{CODE} does not fully work

by ikegami (Pope)
on Apr 13, 2006 at 05:03 UTC ( #543001=note: print w/ replies, xml ) Need Help??


in reply to Re: undefing *foo{CODE} does not fully work
in thread undefing *foo{CODE} does not fully work

While that and works, it also undefines @foo, %foo, etc. It seems to me that the OP is trying to undefined &foo specifically.

Other working solutions with the same caveat:

my $x = \*foo; undef *$x;

and

my $x = 'foo'; { no strict 'refs'; undef *$x; }

and

my $x = do { no strict 'refs'; \*{'foo'} }; undef *$x;


Comment on Re^2: undefing *foo{CODE} does not fully work
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://543001]
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: (18)
As of 2013-06-20 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many continents have you visited?









    Results (680 votes), past polls