in reply to undefining one slot of a typeglob
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
|
---|