I just tracked down another weirdness in Tk's exit behaviour. The case in point was both a script and a Tk error, but the trail lead though global destruction with a tie \*STDIN,'Tk::Event::IO',... still in force (script bug). There was a reference loop - the object implementing the tie had a refrerence to the handle (which of course had a reference to the object) - so nothing happend until clean_objs time. Then perl decided to cleanup some sub-structure (callbacks again) of the object before the object - and that caused Tk indigestion (Tk bug). I _think_ things would have been cleaner if ties were broken before perl took a chainsaw to the reference loops. Has anyone considered a sv_clean_ties() phase to cleanup ? -- Nick Ing-SimmonsThread Previous