It's not my object. I'd need to either install a DESTROY method into the Archive::Extract object violating its implementation or write an object which I could hang my DESTROY-time code off of. tilly's ReleaseAction handles this case nicely. I just pass in my destroy code and make sure the ReleaseAction object is destroyed at the same time as the object.
| [reply] |
| [reply] |
In this case, the destruction moment isn't really identical. It would have been cheap and easy to join the two and it was my first thought. A better idea is to discard the archive object as soon as I've used it up and then retain the cleanup handle until I'm finished working with its extracted contents.
| [reply] |