Commit 45637feb authored by Sebastien's avatar Sebastien

Clean tempfile

parent 2835557a
......@@ -115,7 +115,7 @@ MAIN:
{
my $admin_mail = $O_CONF->Get('admin_mail');
my ($fh_mail, $mail_filename) = File::Temp::tempfile();
my ($fh_mail, $mail_filename) = File::Temp::tempfile(UNLINK => 1);
print $fh_mail <<END;
Subject: [Family-Companion] New user account - $common_name
From: $admin_mail
......
......@@ -140,7 +140,7 @@ sub VacuumAndAnalyze
{
my ($outdir) = @_;
&Log("VACUUM AND ANALYZE");
my ($fh_cmd, $cmdfile) = tempfile();
my ($fh_cmd, $cmdfile) = tempfile(UNLINK => 1);
print $fh_cmd <<END;
VACUUM;
ANALYSE;
......@@ -156,7 +156,7 @@ sub __Load
my ($outdir, $tabfile, $table) = @_;
&Log("FILE - $table - $tabfile");
my ($fh_cmd, $cmdfile) = tempfile();
my ($fh_cmd, $cmdfile) = tempfile(UNLINK => 1);
print $fh_cmd <<END;
.separator "\t"
.import $tabfile $table
......@@ -260,9 +260,9 @@ sub ParseProteomes
{
my ($rh_protein_ids, $rh_proteome_files, $rh_protein_groups) = @_;
my ($fh_proteins_tabfile, $proteins_tabfile) = tempfile();
my ($fh_proteome_tabfile, $proteome_tabfile) = tempfile();
my ($fh_homologyGroup_proteome_association, $homologyGroup_proteome_association) = tempfile();
my ($fh_proteins_tabfile, $proteins_tabfile) = tempfile(UNLINK => 1);
my ($fh_proteome_tabfile, $proteome_tabfile) = tempfile(UNLINK => 1);
my ($fh_homologyGroup_proteome_association, $homologyGroup_proteome_association) = tempfile(UNLINK => 1);
my $protein_id = 1;
my $proteome_id = 1;
......@@ -348,7 +348,7 @@ sub ParseHomologyGroupsResults
{
my ($homologygroups_out, $outdir) = @_;
my ($fh_homologygroups_tabfile, $homologygroups_tabfile) = tempfile();
my ($fh_homologygroups_tabfile, $homologygroups_tabfile) = tempfile(UNLINK => 1);
my $homologygroups_id = &GetNewgroupId($outdir);
if ($homologygroups_id == 0)
......
......@@ -62,7 +62,7 @@ sub GetOrthologousAlignments
my %h_aligned_coreproteome = ();
foreach my $rh_group (@{$ra_orthologous_groups})
{
my ($fh_tmp, $tempfile) = tempfile();
my ($fh_tmp, $tempfile) = tempfile(UNLINK => 1);
foreach my $code (keys %{$rh_group})
{
my $seqid = $rh_group->{$code}->[0];
......
......@@ -165,7 +165,7 @@ sub CreateAccount
}
else
{
my ($fh_err, $err) = File::Temp::tempfile();
my ($fh_err, $err) = File::Temp::tempfile(UNLINK => 1);
my $return = system("($cmd > $err) 2> $err");
if ($return ne 0)
{
......
......@@ -446,7 +446,7 @@ sub SetAdminAccountSend
}
else
{
my ($fh_err,$err) = File::Temp::tempfile();
my ($fh_err,$err) = File::Temp::tempfile(UNLINK => 1);
my $return = system ("($cmd > $err) 2> $err");
if ($return ne 0)
{
......
......@@ -2042,7 +2042,7 @@ sub __WSBlast
my $evalue = $$ro_param->Get('blastevalue');
my ($fh_query, $query_file) = tempfile();
my ($fh_query, $query_file) = tempfile(UNLINK => 1);
print $fh_query uri_unescape($query);
$fh_query->close;
......
......@@ -204,7 +204,7 @@ sub SendMail
my $from = $O_CONF->Get('admin_mail');
$from = $cc if (defined $cc);
my ($fh_mail, $mail_filename) = File::Temp::tempfile();
my ($fh_mail, $mail_filename) = File::Temp::tempfile(UNLINK => 1);
print $fh_mail <<END;
Subject: $subject
From: $from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment