| line |
true |
false |
branch |
|
200
|
0 |
2 |
unless scalar @_ >= 1 |
|
220
|
0 |
2 |
if (ref $template) |
|
227
|
0 |
2 |
if (scalar(@_) % 2 != 0) |
|
234
|
2 |
0 |
if @_ |
|
240
|
0 |
2 |
if ($options{'open'} and $options{'mkdir'}) |
|
255
|
0 |
2 |
if (substr($template, $start - 4 + 1, 4) ne 'XXXX') |
|
277
|
2 |
0 |
if ($options{'mkdir'}) { } |
|
287
|
0 |
2 |
if ($#dirs == 0) { } |
|
291
|
0 |
2 |
if ($^O eq 'VMS') { } |
|
293
|
0 |
0 |
if $parent eq '' |
|
314
|
0 |
0 |
unless $directories ne '' |
|
324
|
0 |
2 |
unless (-e $parent) |
|
328
|
0 |
2 |
unless (-d $parent) |
|
337
|
0 |
2 |
if ('File::Temp'->safe_level == 1) { } |
|
|
0 |
2 |
elsif ('File::Temp'->safe_level == 2) { } |
|
339
|
0 |
0 |
unless (_is_safe($parent, \$safeerr)) |
|
345
|
0 |
0 |
unless (_is_verysafe($parent, \$safeerr)) |
|
356
|
0 |
2 |
if ($options{'open'}) { } |
|
|
2 |
0 |
elsif ($options{'mkdir'}) { } |
|
360
|
0 |
0 |
if ($] < 5.006) |
|
371
|
0 |
0 |
if ($^O eq 'VMS' and ($options{'unlink_on_close'} and not $File::Temp::KEEP_ALL)) { } |
|
376
|
0 |
0 |
$options{'unlink_on_close'} && !$File::Temp::KEEP_ALL ? : |
|
379
|
0 |
0 |
if defined $LOCKFLAG and $options{'use_exlock'} |
|
382
|
0 |
0 |
if ($open_success) { } |
|
394
|
0 |
0 |
unless ($!{'EEXIST'}) |
|
405
|
2 |
0 |
if (mkdir $path, 448) { } |
|
414
|
0 |
0 |
unless ($!{'EEXIST'}) |
|
428
|
0 |
0 |
unless -e $path |
|
459
|
0 |
0 |
if ($counter > $MAX_GUESS) |
|
485
|
0 |
2 |
unless scalar @_ == 2 |
|
494
|
2 |
0 |
$] >= 5.006 ? : |
|
496
|
0 |
2 |
if ($ignore) { } |
|
539
|
0 |
0 |
unless (scalar @info) |
|
544
|
0 |
0 |
if $^O eq 'VMS' |
|
549
|
0 |
0 |
if ($info[4] > 'File::Temp'->top_system_uid and $info[4] != $>) |
|
554
|
0 |
0 |
if ref $err_ref |
|
564
|
0 |
0 |
if ($info[2] & &Fcntl::S_IWGRP or $info[2] & &Fcntl::S_IWOTH) |
|
567
|
0 |
0 |
unless (-d $path) |
|
568
|
0 |
0 |
if ref $err_ref |
|
573
|
0 |
0 |
unless (-k $path) |
|
574
|
0 |
0 |
if ref $err_ref |
|
599
|
0 |
0 |
if $File::Temp::DEBUG |
|
600
|
0 |
0 |
if $^O eq 'VMS' |
|
609
|
0 |
0 |
if eval {
do {
&POSIX::_PC_CHOWN_RESTRICTED();
1
}
} |
|
612
|
0 |
0 |
if (defined $chown_restricted) |
|
615
|
0 |
0 |
if POSIX::sysconf($chown_restricted) |
|
625
|
0 |
0 |
unless ('File::Spec'->file_name_is_absolute($path)) |
|
647
|
0 |
0 |
if $File::Temp::DEBUG |
|
650
|
0 |
0 |
unless _is_safe($dir, $err_ref) |
|
670
|
0 |
0 |
if (grep {$^O eq $_;} 'MSWin32', 'os2', 'VMS', 'dos', 'MacOS', 'haiku') { } |
|
691
|
0 |
0 |
if $level == 0 |
|
694
|
0 |
0 |
if ($^O eq 'MSWin32' or $^O eq 'os2' or $^O eq 'cygwin' or $^O eq 'dos' or $^O eq 'MacOS' or $^O eq 'mpeix') { } |
|
746
|
0 |
2 |
unless defined $at_exit |
|
747
|
0 |
2 |
if @k |
|
749
|
2 |
0 |
if (not $File::Temp::KEEP_ALL) |
|
752
|
0 |
2 |
exists $files_to_unlink{$$} ? : |
|
760
|
0 |
0 |
if (-f $$file[1]) |
|
762
|
0 |
0 |
unless unlink $$file[1] |
|
767
|
2 |
0 |
exists $dirs_to_unlink{$$} ? : |
|
770
|
2 |
0 |
if (-d $dir) |
|
776
|
2 |
0 |
if ($at_exit) |
|
777
|
2 |
0 |
unless defined $cwd |
|
779
|
0 |
2 |
if ($abs eq $cwd) |
|
785
|
0 |
0 |
if $@ and $^W |
|
789
|
0 |
2 |
if (defined $cwd_to_remove) |
|
792
|
0 |
0 |
unless chdir $cwd_to_remove |
|
794
|
0 |
0 |
unless chdir $updir |
|
796
|
0 |
0 |
if $@ and $^W |
|
800
|
0 |
2 |
if exists $files_to_unlink{$$} |
|
802
|
2 |
0 |
if exists $dirs_to_unlink{$$} |
|
815
|
0 |
2 |
unless scalar @_ == 3 |
|
820
|
0 |
2 |
if $File::Temp::DEBUG |
|
830
|
2 |
0 |
if ($isdir) { } |
|
832
|
2 |
0 |
if (-d $fname) { } |
|
836
|
0 |
2 |
if $^O eq 'VMS' |
|
837
|
2 |
0 |
unless exists $dirs_to_unlink{$$} |
|
842
|
0 |
0 |
if $^W |
|
847
|
0 |
0 |
if (-f $fname) { } |
|
850
|
0 |
0 |
unless exists $files_to_unlink{$$} |
|
855
|
0 |
0 |
if $^W |
|
868
|
0 |
2 |
scalar(@_) % 2 == 1 ? : |
|
874
|
0 |
2 |
$leading_template ? : |
|
|
0 |
2 |
exists $args{'TEMPLATE'} ? : |
|
891
|
0 |
0 |
exists $$args{'UNLINK'} ? : |
|
900
|
0 |
0 |
if $File::Temp::DEBUG |
|
927
|
0 |
0 |
exists $$args{'CLEANUP'} ? : |
|
965
|
0 |
0 |
if (@_) |
|
981
|
0 |
0 |
if (exists $FILES_CREATED_BY_OBJECT{$$}{$file}) |
|
986
|
0 |
0 |
if (${*$self;}{'UNLINK'} and not $File::Temp::KEEP_ALL) |
|
987
|
0 |
0 |
if $File::Temp::DEBUG |
|
990
|
0 |
0 |
unless $was_created_by_proc |
|
999
|
0 |
0 |
unless unlink1($self, $file) |
|
1006
|
0 |
0 |
if (@_ and $_[0] eq 'File::Temp') |
|
1024
|
0 |
0 |
@$maybe_template ? : |
|
1030
|
0 |
0 |
unless ($options{'OPEN'}) |
|
1032
|
0 |
0 |
if $^W |
|
1037
|
0 |
0 |
if ($options{'DIR'} and $^O eq 'VMS') |
|
1051
|
0 |
0 |
if (defined $template) { } |
|
1053
|
0 |
0 |
if ($options{'DIR'}) { } |
|
|
0 |
0 |
elsif ($options{'TMPDIR'}) { } |
|
1065
|
0 |
0 |
if ($options{'DIR'}) { } |
|
1090
|
0 |
0 |
wantarray ? : |
|
1094
|
0 |
0 |
unless ($fh, $path) = _gettemp($template, 'open', $options{'OPEN'}, 'mkdir', 0, 'unlink_on_close', $unlink_on_close, 'suffixlen', length $options{'SUFFIX'}, 'ErrStr', \$errstr, 'use_exlock', $options{'EXLOCK'}) |
|
1110
|
0 |
0 |
if $options{'UNLINK'} |
|
1113
|
0 |
0 |
if (wantarray) { } |
|
1115
|
0 |
0 |
if ($options{'OPEN'}) { } |
|
1125
|
0 |
0 |
unless unlink0($fh, $path) |
|
1138
|
0 |
2 |
if (@_ and $_[0] eq 'File::Temp') |
|
1154
|
0 |
2 |
@$maybe_template ? : |
|
1162
|
0 |
2 |
if (defined $template) { } |
|
1165
|
0 |
0 |
if ($options{'TMPDIR'} or $options{'DIR'}) |
|
1170
|
0 |
0 |
if $^O eq 'VMS' |
|
1177
|
0 |
0 |
if ($options{'DIR'}) { } |
|
|
0 |
0 |
elsif ($options{'TMPDIR'}) { } |
|
1192
|
0 |
2 |
if ($options{'DIR'}) { } |
|
1207
|
0 |
2 |
if ($^O eq 'VMS') |
|
1211
|
0 |
2 |
if ($^O eq 'MacOS' and substr($template, -1) eq ':') |
|
1217
|
0 |
2 |
unless (undef, $tempdir) = _gettemp($template, 'open', 0, 'mkdir', 1, 'suffixlen', $suffixlen, 'ErrStr', \$errstr) |
|
1226
|
2 |
0 |
if ($options{'CLEANUP'} and -d $tempdir) |
|
1240
|
0 |
0 |
if scalar @_ != 1 |
|
1246
|
0 |
0 |
unless ($fh, $path) = _gettemp($template, 'open', 1, 'mkdir', 0, 'suffixlen', 0, 'ErrStr', \$errstr) |
|
1254
|
0 |
0 |
if (wantarray) { } |
|
1266
|
0 |
0 |
if scalar @_ != 2 |
|
1276
|
0 |
0 |
unless ($fh, $path) = _gettemp($template, 'open', 1, 'mkdir', 0, 'suffixlen', length $suffix, 'ErrStr', \$errstr) |
|
1284
|
0 |
0 |
if (wantarray) { } |
|
1297
|
0 |
0 |
if scalar @_ != 1 |
|
1302
|
0 |
0 |
if ($^O eq 'VMS') |
|
1306
|
0 |
0 |
if ($^O eq 'MacOS' and substr($template, -1) eq ':') |
|
1311
|
0 |
0 |
unless ($junk, $tmpdir) = _gettemp($template, 'open', 0, 'mkdir', 1, 'suffixlen', $suffixlen, 'ErrStr', \$errstr) |
|
1326
|
0 |
0 |
if scalar @_ != 1 |
|
1332
|
0 |
0 |
unless ($junk, $tmpname) = _gettemp($template, 'open', 0, 'mkdir', 0, 'suffixlen', 0, 'ErrStr', \$errstr) |
|
1349
|
0 |
0 |
if $tmpdir eq '' |
|
1355
|
0 |
0 |
if (wantarray) { } |
|
1371
|
0 |
0 |
unless unlink0($fh, $file) |
|
1381
|
0 |
0 |
unless scalar @_ == 2 |
|
1398
|
0 |
0 |
unless scalar @_ == 2 |
|
1404
|
0 |
0 |
unless cmpstat($fh, $path) |
|
1407
|
0 |
0 |
if (_can_unlink_opened_file()) |
|
1410
|
0 |
0 |
if $File::Temp::KEEP_ALL |
|
1414
|
0 |
0 |
if -d $path |
|
1415
|
0 |
0 |
unless unlink $path |
|
1420
|
0 |
0 |
if $File::Temp::DEBUG |
|
1428
|
0 |
0 |
if $fh[3] == 0 or $^O eq 'cygwin' |
|
1438
|
0 |
0 |
unless scalar @_ == 2 |
|
1444
|
0 |
0 |
if $File::Temp::DEBUG |
|
1455
|
0 |
0 |
unless @fh |
|
1457
|
0 |
0 |
if ($fh[3] > 1 and $^W) |
|
1458
|
0 |
0 |
if $^W |
|
1464
|
0 |
0 |
unless (@path) |
|
1465
|
0 |
0 |
if $^W |
|
1470
|
0 |
0 |
unless (-f $path) |
|
1480
|
0 |
0 |
if ($^O eq 'MSWin32') { } |
|
|
0 |
0 |
elsif ($^O eq 'os2') { } |
|
|
0 |
0 |
elsif ($^O eq 'VMS') { } |
|
|
0 |
0 |
elsif ($^O eq 'dos') { } |
|
|
0 |
0 |
elsif ($^O eq 'mpeix') { } |
|
1494
|
0 |
0 |
if $File::Temp::DEBUG |
|
1498
|
0 |
0 |
unless ($fh[$_] eq $path[$_]) |
|
1499
|
0 |
0 |
if $File::Temp::DEBUG |
|
1509
|
0 |
0 |
unless scalar @_ == 2 |
|
1515
|
0 |
0 |
unless cmpstat($fh, $path) |
|
1518
|
0 |
0 |
unless close $fh |
|
1524
|
0 |
0 |
if $File::Temp::KEEP_ALL |
|
1536
|
0 |
4 |
if (@_) |
|
1538
|
0 |
0 |
if ($level != 0 and $level != 1 and $level != 2) { } |
|
1539
|
0 |
0 |
if $^W |
|
1542
|
0 |
0 |
if ($] < 5.006 and $level != 0) |
|
1548
|
0 |
0 |
if _can_do_level($level) |
|
1561
|
0 |
0 |
if (@_) |
|
1563
|
0 |
0 |
unless $newuid =~ /^\d+$/s |
|
1600
|
0 |
0 |
if (@_) |
|
1609
|
0 |
0 |
if ($self->unlink_on_destroy and $$ == $$self{'LAUNCHPID'} and not $File::Temp::KEEP_ALL) |
|
1611
|
0 |
0 |
if (-d $$self{'REALNAME'}) |
|
1617
|
0 |
0 |
if $@ and $^W |