From 16c6001409ed5fa9eac7a2f45ef03f0d4dbd6059 Mon Sep 17 00:00:00 2001 From: hjp Date: Sun, 21 May 2006 15:08:33 +0000 Subject: [PATCH] Automatically unlink temporary files. --- TimeSeries.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TimeSeries.pm b/TimeSeries.pm index fd8fcdf..fff1ad0 100644 --- a/TimeSeries.pm +++ b/TimeSeries.pm @@ -27,7 +27,7 @@ use Data::Dumper; use HTTP::Date qw(parse_date); use Time::Local qw(timegm_nocheck); -$VERSION = do { my @r=(q$Revision: 1.12 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; +$VERSION = do { my @r=(q$Revision: 1.13 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; =head2 new(%opts) @@ -316,7 +316,7 @@ sub plot { my ($self) = @_; #print Dumper($self); - my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 0); + my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 1); for my $i (@{$self->{data}}) { my $time = $i->[0]; my $data = $i->[1]; @@ -337,8 +337,8 @@ sub plot { } close($datafh); - my ($ctlfh, $ctlfn) = tempfile(); - my ($psfh, $psfn) = tempfile(); + my ($ctlfh, $ctlfn) = tempfile(UNLINK => 1); + my ($psfh, $psfn) = tempfile(UNLINK => 1); # generic settings