Lines Matching refs:fh

50 #pod   $fh = tempfile();
51 #pod ($fh, $filename) = tempfile();
53 #pod ($fh, $filename) = tempfile( $template, DIR => $dir);
54 #pod ($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
55 #pod ($fh, $filename) = tempfile( $template, TMPDIR => 1 );
57 #pod binmode( $fh, ":utf8" );
60 #pod ($fh, $filename) = tempfile( DIR => $dir );
68 #pod $fh = File::Temp->new();
69 #pod $fname = $fh->filename;
71 #pod $fh = File::Temp->new(TEMPLATE => $template);
72 #pod $fname = $fh->filename;
88 #pod ($fh, $file) = mkstemp( "tmpfileXXXXX" );
89 #pod ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix);
100 #pod $fh = tmpfile();
102 #pod ($fh, $file) = tmpnam();
326 # ($fh, $name) = _gettemp($template, "open" => 1);
333 croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);'
494 my $fh;
498 $fh = &Symbol::gensym;
510 $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, $perms, 'fop=dlt');
511 $open_success = $fh;
517 $open_success = sysopen($fh, $path, $flags, $perms);
525 return ($fh, $path);
846 # _deferred_unlink( $fh, $fname, $isdir );
952 croak 'Usage: _deferred_unlink($fh, $fname, $isdir)'
955 my ($fh, $fname, $isdir) = @_;
989 push(@{ $files_to_unlink{$$} }, [$fh, $fname]);
1037 #pod $fh eq $filename # as a string
1038 #pod $fh != \*STDOUT # as a number
1089 my ($fh, $path) = tempfile( @$maybe_template, %$args );
1091 print "Tmp: $fh - $path\n" if $DEBUG;
1094 ${*$fh} = $path;
1100 %{*$fh} = %$args;
1103 bless $fh, $class;
1106 $fh->unlink_on_destroy( $unlink );
1108 return $fh;
1201 #pod $fh->unlink_on_destroy( 1 );
1287 #pod $fh = tempfile();
1288 #pod ($fh, $filename) = tempfile();
1293 #pod ($fh, $filename) = tempfile($template);
1300 #pod ($fh, $filename) = tempfile($template, SUFFIX => $suffix)
1307 #pod ($fh, $filename) = tempfile($template, DIR => $dir);
1312 #pod ($fh, $filename) = tempfile($template, TMPDIR => 1);
1318 #pod ($fh, $filename) = tempfile($template, UNLINK => 1);
1336 #pod $fh = tempfile( DIR => $dir );
1366 #pod ($fh, $filename) = tempfile($template, EXLOCK => 1);
1371 #pod ($fh, $filename) = tempfile($template, PERMS => 0666);
1478 my ($fh, $path, $errstr);
1480 unless (($fh, $path) = _gettemp($template,
1496 _deferred_unlink($fh, $path, 0) if $options{"UNLINK"};
1502 return ($fh, $path);
1511 unlink0($fh, $path) or croak "Error unlinking file $path using unlink0";
1514 return $fh;
1751 #pod ($fh, $name) = mkstemp( $template );
1774 my ($fh, $path, $errstr);
1776 unless (($fh, $path) = _gettemp($template,
1784 return ($fh, $path);
1786 return $fh;
1797 #pod ($fh, $name) = mkstemps( $template, $suffix );
1821 my ($fh, $path, $errstr);
1823 unless (($fh, $path) = _gettemp($template,
1831 return ($fh, $path);
1833 return $fh;
1950 #pod ($fh, $file) = tmpnam();
1988 #pod $fh = tmpfile();
2008 my ($fh, $file) = tmpnam();
2012 unlink0($fh, $file)
2015 return $fh;
2087 #pod unlink0($fh, $path)
2134 my ($fh, $path) = @_;
2136 cmpstat($fh, $path) or return 0;
2150 my @fh = stat $fh;
2152 print "Link count = $fh[3] \n" if $DEBUG;
2160 return 1 if $fh[3] == 0 || $^O eq 'cygwin';
2163 _deferred_unlink($fh, $path, 0);
2174 #pod cmpstat($fh, $path)
2200 my ($fh, $path) = @_;
2208 my @fh;
2211 @fh = stat $fh;
2213 return unless @fh;
2215 if ($fh[3] > 1 && $^W) {
2216 carp "unlink0: fstat found too many links; SB=@fh" if $^W;
2229 confess "panic: $path is no longer a file: SB=@fh";
2237 my @okstat = (0..$#fh); # Use all by default
2241 @okstat = (0, 2..$#fh);
2245 @okstat = (0,2..7,11..$#fh);
2252 print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG;
2256 unless ($fh[$_] eq $path[$_]) {
2273 #pod unlink1($fh, $path)
2294 my ($fh, $path) = @_;
2296 cmpstat($fh, $path) or return 0;
2299 close( $fh ) or return 0;
2513 #pod then on a unix system you can use C<"/dev/fd/" . fileno($fh)> for
2515 #pod C<< open >> can be passed C<< "+<=&" . fileno($fh) >>. Otherwise you
2522 #pod or die "Can't clear close-on-exec flag on temp fh: $!\n";
2672 $fh = tempfile();
2673 ($fh, $filename) = tempfile();
2675 ($fh, $filename) = tempfile( $template, DIR => $dir);
2676 ($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
2677 ($fh, $filename) = tempfile( $template, TMPDIR => 1 );
2679 binmode( $fh, ":utf8" );
2682 ($fh, $filename) = tempfile( DIR => $dir );
2690 $fh = File::Temp->new();
2691 $fname = $fh->filename;
2693 $fh = File::Temp->new(TEMPLATE => $template);
2694 $fname = $fh->filename;
2710 ($fh, $file) = mkstemp( "tmpfileXXXXX" );
2711 ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix);
2722 $fh = tmpfile();
2724 ($fh, $file) = tmpnam();
2818 $fh eq $filename # as a string
2819 $fh != \*STDOUT # as a number
2900 $fh->unlink_on_destroy( 1 );
2942 $fh = tempfile();
2943 ($fh, $filename) = tempfile();
2948 ($fh, $filename) = tempfile($template);
2955 ($fh, $filename) = tempfile($template, SUFFIX => $suffix)
2962 ($fh, $filename) = tempfile($template, DIR => $dir);
2967 ($fh, $filename) = tempfile($template, TMPDIR => 1);
2973 ($fh, $filename) = tempfile($template, UNLINK => 1);
2991 $fh = tempfile( DIR => $dir );
3021 ($fh, $filename) = tempfile($template, EXLOCK => 1);
3026 ($fh, $filename) = tempfile($template, PERMS => 0666);
3119 ($fh, $name) = mkstemp( $template );
3136 ($fh, $name) = mkstemps( $template, $suffix );
3206 ($fh, $file) = tmpnam();
3222 $fh = tmpfile();
3287 unlink0($fh, $path)
3333 cmpstat($fh, $path)
3359 unlink1($fh, $path)
3532 then on a unix system you can use C<"/dev/fd/" . fileno($fh)> for
3534 C<< open >> can be passed C<< "+<=&" . fileno($fh) >>. Otherwise you
3541 or die "Can't clear close-on-exec flag on temp fh: $!\n";