I have a Log class in which I have an attribute of IO::File. I wanted to have a finish line written out to the file handle before the log class goes out of scope. I tried putting the code in the DESTROY of the Log class but this did not work. Then I tried changing the symbol table as in http://www.perlmonks.org/?node_id=394129 however this changed all of my instances of IO::File. Is there a good way to redefine the DESTROY that is called for just one instance of IO::File that would not affect any other instances?
Best Regards
Ty