Michael Peters wrote: > Michael G Schwern wrote: > >> A simple strategy might be to just replace the global singleton with the >> child's guts at the start of a subtest() and then back out again at >> the end. >> >> %$Test = %$child; >> >> Watch out for edge cases of when subtest() dies, make sure the >> parent's guts >> get put back. > > "local" should be good for doing that right?
Normally, yes. local $Test will localize the value of $Test, which is a reference, not its guts. local %$Test would seem to be the right thing, but I'm not sure if that will DWIM. -- 7. Not allowed to add "In accordance with the prophesy" to the end of answers I give to a question an officer asks me. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/