Automatically unlink temporary files.

This commit is contained in:
hjp 2006-05-21 15:08:33 +00:00
parent 62a3275179
commit 16c6001409
1 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ use Data::Dumper;
use HTTP::Date qw(parse_date); use HTTP::Date qw(parse_date);
use Time::Local qw(timegm_nocheck); 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) =head2 new(%opts)
@ -316,7 +316,7 @@ sub plot {
my ($self) = @_; my ($self) = @_;
#print Dumper($self); #print Dumper($self);
my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 0); my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 1);
for my $i (@{$self->{data}}) { for my $i (@{$self->{data}}) {
my $time = $i->[0]; my $time = $i->[0];
my $data = $i->[1]; my $data = $i->[1];
@ -337,8 +337,8 @@ sub plot {
} }
close($datafh); close($datafh);
my ($ctlfh, $ctlfn) = tempfile(); my ($ctlfh, $ctlfn) = tempfile(UNLINK => 1);
my ($psfh, $psfn) = tempfile(); my ($psfh, $psfn) = tempfile(UNLINK => 1);
# generic settings # generic settings