Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: undefining one slot of a typeglob

by dws (Chancellor)
on Feb 24, 2004 at 00:19 UTC ( [id://331268]=note: print w/replies, xml ) Need Help??


in reply to undefining one slot of a typeglob

What i'm basically looking for is a way to 'undo' changes made to the symbol table.

If you make the changes within a scope, you can localize them such that they'll be automagically undone when the scope exits.

sub foo { print "foo\n" } { local *foo = sub { print "bar\n" }; foo(); } foo(); __END__ bar foo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found