Pulling another all-nighter and am gettin' some unwanted behavior from File::Temp.. Anyone know what I'm missing?
OS is FreeBSD 6.2, PERL is 5.8.8, if that matters
Here is code which reproduces this unwanted behavior:
use File::Temp q/tempfile/;
my $tmp = new File::Temp('DIR' => '/tmp', 'UNLINK' => 1);
What is going on is that as this script runs I can run "ls -l /tmp" and see the files being created and destroyed. But as soon as I hit ctrl-C to quit, the last temp file it created is still hanging around (otherwise known as the "unwanted behavior").
I would note that removing 'UNLINK' => 1 from the constructor, or using the my ($fh, $filename) = tempname('DIR' => '/tmp', 'UNLINK' => 1);
produces the same result. The only reason I changed it from that was in an attempt to debug what is going on.