On Tue, Jan 13, 2004 at 12:05:26AM +0000, Nicholas Clark wrote: > > A quick test shows that undefining a subroutine has the annoying habit of > invalidating any subroutine references you hold.
You can, however, (for package subs) by do my $cr = *{"main::foo"}{CODE}; since that takes a copy of the coderef stored in the typeglob, and hence sub foo can be obliterated without it being GC'ed. This may not be what you want, but it's saved me on a number of occasions. -- Bring me my etherkiller; Oh clouds unfold! / Bring me the magic smoke of desire I shall not cease from mental fight / Nor shall my LART rest in my hand Till we have buried the bodies / Of all the lusers in all this land -- rpg, ASR [ My homepage is http://www.trout.me.uk/ ]