[Bioperl-l] tempfile cleanup

Jason Stajich jason at bioperl.org
Fri Oct 6 14:36:49 EDT 2006


I think the magic trickery in there for cleanup is that File::Temp  
only cleans up tempfiles when Perl exits not when the Root::IO object  
goes out of scope -- so this can be a problem for people on CGI  
scripts that stay resident in memory and don't ever have tempfiles  
cleaned up.  The managing the list aspect allows us to call _cleanup  
periodically (perhaps before the start of every Blast run) to insure  
that tempfiles are removed.  perhaps newer File::Temp versions can  
solve this better now but I believe that was the behavior we were  
trying to deal with with managing the list of to-be-deleted files by  
the Root::IO object.

This is some hackery that also had to do with not expecting  
File::Temp to be installed I believe.

-jason



More information about the Bioperl-l mailing list