in reply to Automatically deleting selected directories on program exit

Not commenting on the technique itself, but on the usage of delete_on_close: I try to avoid Fully::Qualified::functions() in OO code because mixing them up with inheritable class methods is such an easy source for bugs. That is, I almost *always* use a class method and call it with Class->meth() syntax.

This code is actually an example where the change isn't absolutely trivial, because $On_close is a file-scoped lexical. I'd put it in a tighter scope and write an accessor (or for smaller stuff cop out and make it our).