View | Details | Raw Unified
Collapse All | Expand All

(-) perl-5.8.3.orig/ext/DB_File/DB_File.pm (-4 / +4 lines)
 Lines 1821-1827    Link Here 
    use DB_File ;
    use DB_File ;
    my %hash ;
    my %hash ;
    my $filename = "/tmp/filt" ;
    my $filename = "/var/run/filt" ;
    unlink $filename ;
    unlink $filename ;
    my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH 
    my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH 
 Lines 1863-1869    Link Here 
    use strict ;
    use strict ;
    use DB_File ;
    use DB_File ;
    my %hash ;
    my %hash ;
    my $filename = "/tmp/filt" ;
    my $filename = "/var/run/filt" ;
    unlink $filename ;
    unlink $filename ;
 Lines 1894-1901    Link Here 
The locking technique went like this. 
The locking technique went like this. 
    $db = tie(%db, 'DB_File', '/tmp/foo.db', O_CREAT|O_RDWR, 0666)
    $db = tie(%db, 'DB_File', '/var/run/foo.db', O_CREAT|O_RDWR, 0644)
        || die "dbcreat /tmp/foo.db $!";
        || die "dbcreat /var/run/foo.db $!";
    $fd = $db->fd;
    $fd = $db->fd;
    open(DB_FH, "+<&=$fd") || die "dup $!";
    open(DB_FH, "+<&=$fd") || die "dup $!";
    flock (DB_FH, LOCK_EX) || die "flock: $!";
    flock (DB_FH, LOCK_EX) || die "flock: $!";
(-) perl-5.8.3.orig/ext/DB_File/t/db-recno.t (-1 / +1 lines)
 Lines 1198-1204    Link Here 
my $testnum = 181;
my $testnum = 181;
my $failed = 0;
my $failed = 0;
require POSIX; my $tmp = POSIX::tmpnam();
my $tmp = "dbr$$";
foreach my $test (@tests) {
foreach my $test (@tests) {
    my $err = test_splice(@$test);
    my $err = test_splice(@$test);
    if (defined $err) {
    if (defined $err) {
(-) perl-5.8.3.orig/ext/Devel/PPPort/PPPort.pm (-4 / +4 lines)
 Lines 349-361    Link Here 
	}
	}
	
	
	if ($changes) {
	if ($changes) {
		open(OUT,">/tmp/ppport.h.$$");
		open(OUT,"ppport.h.$$");
		print OUT $c;
		print OUT $c;
		close(OUT);
		close(OUT);
		open(DIFF, "diff -u $filename /tmp/ppport.h.$$|");
		open(DIFF, "diff -u $filename ppport.h.$$|");
		while (<DIFF>) { s!/tmp/ppport\.h\.$$!$filename.patched!; print STDOUT; }
		while (<DIFF>) { s!ppport\.h\.$$!$filename.patched!; print STDOUT; }
		close(DIFF);
		close(DIFF);
		unlink("/tmp/ppport.h.$$");
		unlink("ppport.h.$$");
	} else {
	} else {
		print "Looks OK\n";
		print "Looks OK\n";
	}
	}
(-) perl-5.8.3.orig/ext/IO/t/io_unix.t (-2 / +2 lines)
 Lines 24-30    Link Here 
	elsif ($^O eq 'os2') {
	elsif ($^O eq 'os2') {
	    require IO::Socket;
	    require IO::Socket;
	    eval {IO::Socket::pack_sockaddr_un('/tmp/foo') || 1}
	    eval {IO::Socket::pack_sockaddr_un('/foo/bar') || 1}
	      or $@ !~ /not implemented/ or
	      or $@ !~ /not implemented/ or
		$reason = 'compiled without TCP/IP stack v4';
		$reason = 'compiled without TCP/IP stack v4';
	} elsif ($^O =~ m/^(?:qnx|nto|vos)$/ ) {
	} elsif ($^O =~ m/^(?:qnx|nto|vos)$/ ) {
 Lines 37-43    Link Here 
    }
    }
}
}
$PATH = "/tmp/sock-$$";
$PATH = "sock-$$";
# Test if we can create the file within the tmp directory
# Test if we can create the file within the tmp directory
if (-e $PATH or not open(TEST, ">$PATH") and $^O ne 'os2') {
if (-e $PATH or not open(TEST, ">$PATH") and $^O ne 'os2') {
(-) perl-5.8.3.orig/ext/ODBM_File/ODBM_File.xs (-1 / +1 lines)
 Lines 32-38    Link Here 
 * Set DBM_BUG_DUPLICATE_FREE in the extension hint file.
 * Set DBM_BUG_DUPLICATE_FREE in the extension hint file.
 */
 */
/* Close the previous dbm, and fail to open a new dbm */
/* Close the previous dbm, and fail to open a new dbm */
#define dbmclose()	((void) dbminit("/tmp/x/y/z/z/y"))
#define dbmclose()	((void) dbminit("/nonexistent"))
#endif
#endif
#include <fcntl.h>
#include <fcntl.h>
(-) perl-5.8.3.orig/ext/POSIX/POSIX.pod (-5 / +5 lines)
 Lines 417-425    Link Here 
uses file descriptors such as those obtained by calling C<POSIX::open>.
uses file descriptors such as those obtained by calling C<POSIX::open>.
The following will determine the maximum length of the longest allowable
The following will determine the maximum length of the longest allowable
pathname on the filesystem which holds C</tmp/foo>.
pathname on the filesystem which holds C</var/foo>.
	$fd = POSIX::open( "/tmp/foo", &POSIX::O_RDONLY );
	$fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
	$path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
	$path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
Returns C<undef> on failure.
Returns C<undef> on failure.
 Lines 919-925    Link Here 
Open a directory for reading.
Open a directory for reading.
	$dir = POSIX::opendir( "/tmp" );
	$dir = POSIX::opendir( "/var" );
	@files = POSIX::readdir( $dir );
	@files = POSIX::readdir( $dir );
	POSIX::closedir( $dir );
	POSIX::closedir( $dir );
 Lines 930-938    Link Here 
Retrieves the value of a configurable limit on a file or directory.
Retrieves the value of a configurable limit on a file or directory.
The following will determine the maximum length of the longest allowable
The following will determine the maximum length of the longest allowable
pathname on the filesystem which holds C</tmp>.
pathname on the filesystem which holds C</var>.
	$path_max = POSIX::pathconf( "/tmp", &POSIX::_PC_PATH_MAX );
	$path_max = POSIX::pathconf( "/var", &POSIX::_PC_PATH_MAX );
Returns C<undef> on failure.
Returns C<undef> on failure.
(-) perl-5.8.3.orig/ext/Socket/Socket.pm (-2 / +2 lines)
 Lines 32-39    Link Here 
    $proto = getprotobyname('tcp');
    $proto = getprotobyname('tcp');
    socket(Socket_Handle, PF_UNIX, SOCK_STREAM, $proto);
    socket(Socket_Handle, PF_UNIX, SOCK_STREAM, $proto);
    unlink('/tmp/usock');
    unlink('/var/run/usock');
    $sun = sockaddr_un('/tmp/usock');
    $sun = sockaddr_un('/var/run/usock');
    connect(Socket_Handle,$sun);
    connect(Socket_Handle,$sun);
=head1 DESCRIPTION
=head1 DESCRIPTION
(-) perl-5.8.3.orig/ext/Storable/Storable.pm (-3 / +3 lines)
 Lines 786-795    Link Here 
	%color = ('Blue' => 0.1, 'Red' => 0.8, 'Black' => 0, 'White' => 1);
	%color = ('Blue' => 0.1, 'Red' => 0.8, 'Black' => 0, 'White' => 1);
	store(\%color, '/tmp/colors') or die "Can't store %a in /tmp/colors!\n";
	store(\%color, '/var/run/colors') or die "Can't store %a in /var/run/colors!\n";
	$colref = retrieve('/tmp/colors');
	$colref = retrieve('/var/run/colors');
	die "Unable to retrieve from /tmp/colors!\n" unless defined $colref;
	die "Unable to retrieve from /var/run/colors!\n" unless defined $colref;
	printf "Blue is still %lf\n", $colref->{'Blue'};
	printf "Blue is still %lf\n", $colref->{'Blue'};
	$colref2 = dclone(\%color);
	$colref2 = dclone(\%color);
(-) perl-5.8.3.orig/ext/Time/HiRes/Makefile.PL (-9 / +1 lines)
 Lines 71-89    Link Here 
# without changing it, and then I'd always forget to change it before a
# without changing it, and then I'd always forget to change it before a
# release. Sorry, Edward :)
# release. Sorry, Edward :)
sub TMPDIR {
    my $TMPDIR =
	(grep(defined $_ && -d $_ && -w _,
	      ((defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : undef),
	       qw(/var/tmp /usr/tmp /tmp c:/temp))))[0];
    $TMPDIR || die "Cannot find writable temporary directory.\n";
}
sub try_compile_and_link {
sub try_compile_and_link {
    my ($c, %args) = @_;
    my ($c, %args) = @_;
    my ($ok) = 0;
    my ($ok) = 0;
    my ($tmp) = (($^O eq 'VMS') ? "sys\$scratch:tmp$$" : TMPDIR() . '/' . "tmp$$");
    my ($tmp) = "tmp$$";
    local(*TMPC);
    local(*TMPC);
    my $obj_ext = $Config{obj_ext} || ".o";
    my $obj_ext = $Config{obj_ext} || ".o";
(-) perl-5.8.3.orig/lib/CGI/Cookie.pm (-1 / +1 lines)
 Lines 407-413    Link Here 
You may also retrieve cookies that were stored in some external
You may also retrieve cookies that were stored in some external
form using the parse() class method:
form using the parse() class method:
       $COOKIES = `cat /usr/tmp/Cookie_stash`;
       $COOKIES = `cat /var/run/www/Cookie_stash`;
       %cookies = parse CGI::Cookie($COOKIES);
       %cookies = parse CGI::Cookie($COOKIES);
If you are in a mod_perl environment, you can save some overhead by
If you are in a mod_perl environment, you can save some overhead by
(-) perl-5.8.3.orig/lib/CGI.pm (+3 lines)
 Lines 2-7    Link Here 
require 5.004;
require 5.004;
use Carp 'croak';
use Carp 'croak';
# XXX: The temporary file handling implemented in here is crap.  It should
# be re-done making use of File::Temp.
# See the bottom of this file for the POD documentation.  Search for the
# See the bottom of this file for the POD documentation.  Search for the
# string '=head'.
# string '=head'.
(-) perl-5.8.3.orig/lib/CPAN.pm (-1 / +1 lines)
 Lines 2273-2279    Link Here 
# If more accuracy is wanted/needed, Chris Leach sent me this patch...
# If more accuracy is wanted/needed, Chris Leach sent me this patch...
 # > *** /install/perl/live/lib/CPAN.pm-	Wed Sep 24 13:08:48 1997
 # > *** /install/perl/live/lib/CPAN.pm-	Wed Sep 24 13:08:48 1997
 # > --- /tmp/cp	Wed Sep 24 13:26:40 1997
 # > --- cp	Wed Sep 24 13:26:40 1997
 # > ***************
 # > ***************
 # > *** 1562,1567 ****
 # > *** 1562,1567 ****
 # > --- 1562,1580 ----
 # > --- 1562,1580 ----
(-) perl-5.8.3.orig/lib/ExtUtils/MakeMaker.pm (-4 / +4 lines)
 Lines 1013-1019    Link Here 
The Makefile to be produced may be altered by adding arguments of the
The Makefile to be produced may be altered by adding arguments of the
form C<KEY=VALUE>. E.g.
form C<KEY=VALUE>. E.g.
  perl Makefile.PL PREFIX=/tmp/myperl5
  perl Makefile.PL PREFIX=~/myperl5
Other interesting targets in the generated Makefile are
Other interesting targets in the generated Makefile are
 Lines 1355-1367    Link Here 
This is the root directory into which the code will be installed.  It
This is the root directory into which the code will be installed.  It
I<prepends itself to the normal prefix>.  For example, if your code
I<prepends itself to the normal prefix>.  For example, if your code
would normally go into /usr/local/lib/perl you could set DESTDIR=/tmp/
would normally go into /usr/local/lib/perl you could set DESTDIR=/other/
and installation would go into /tmp/usr/local/lib/perl.
and installation would go into /other/usr/local/lib/perl.
This is primarily of use for people who repackage Perl modules.
This is primarily of use for people who repackage Perl modules.
NOTE: Due to the nature of make, it is important that you put the trailing
NOTE: Due to the nature of make, it is important that you put the trailing
slash on your DESTDIR.  "/tmp/" not "/tmp".
slash on your DESTDIR.  "/other/" not "/other".
=item DIR
=item DIR
(-) perl-5.8.3.orig/lib/ExtUtils/instmodsh (-10 / +7 lines)
 Lines 2-7    Link Here 
use strict;
use strict;
use IO::File;
use IO::File;
use File::Temp;
use ExtUtils::Packlist;
use ExtUtils::Packlist;
use ExtUtils::Installed;
use ExtUtils::Installed;
 Lines 58-73    Link Here 
      $reply =~ /^t\s*/ and do
      $reply =~ /^t\s*/ and do
         {
         {
         my $file = (split(' ', $reply))[1];
         my $file = (split(' ', $reply))[1];
         my $tmp = "/tmp/inst.$$";
         my ($fh, $tmp) = File::Temp::tempfile(UNLINK => 1);
         if (my $fh = IO::File->new($tmp, "w"))
         $fh->print(join("\n", $Inst->files($module)));
            {
         $fh->close();
            $fh->print(join("\n", $Inst->files($module)));
         # This used to use -I which is wrong for GNU tar.
            $fh->close();
         system("tar cvf $file -T $tmp");
            system("tar cvf $file -I $tmp");
         unlink($tmp);
            unlink($tmp);
            last CASE;
            }
         else { print("Can't open $file: $!\n"); }
         last CASE;
         last CASE;
         };
         };
      $reply eq 'v' and do
      $reply eq 'v' and do
(-) perl-5.8.3.orig/lib/Memoize/t/tie.t (-8 / +1 lines)
 Lines 29-42    Link Here 
  $_[0]+1;
  $_[0]+1;
}
}
if (eval {require File::Spec::Functions}) {
$file = "md$$";
  File::Spec::Functions->import('tmpdir', 'catfile');
  $tmpdir = tmpdir();
} else {
  *catfile = sub { join '/', @_ };
  $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
}
$file = catfile($tmpdir, "md$$");
@files = ($file, "$file.db", "$file.dir", "$file.pag");
@files = ($file, "$file.db", "$file.dir", "$file.pag");
1 while unlink @files;
1 while unlink @files;
(-) perl-5.8.3.orig/lib/Memoize/t/tie_gdbm.t (-7 / +1 lines)
 Lines 26-38    Link Here 
print "1..4\n";
print "1..4\n";
if (eval {require File::Spec::Functions}) {
$file = "md$$";
 File::Spec::Functions->import();
} else {
  *catfile = sub { join '/', @_ };
}
$tmpdir = $ENV{TMP} || $ENV{TMPDIR} ||  '/tmp';  
$file = catfile($tmpdir, "md$$");
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
tryout('GDBM_File', $file, 1);  # Test 1..4
tryout('GDBM_File', $file, 1);  # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
(-) perl-5.8.3.orig/lib/Memoize/t/tie_ndbm.t (-8 / +1 lines)
 Lines 28-41    Link Here 
print "1..4\n";
print "1..4\n";
$file = "md$$";
if (eval {require File::Spec::Functions}) {
 File::Spec::Functions->import();
} else {
  *catfile = sub { join '/', @_ };
}
$tmpdir = $ENV{TMP} || $ENV{TMPDIR} ||  '/tmp';  
$file = catfile($tmpdir, "md$$");
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
tryout('Memoize::NDBM_File', $file, 1);  # Test 1..4
tryout('Memoize::NDBM_File', $file, 1);  # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
(-) perl-5.8.3.orig/lib/Memoize/t/tie_sdbm.t (-8 / +1 lines)
 Lines 28-41    Link Here 
print "1..4\n";
print "1..4\n";
if (eval {require File::Spec::Functions}) {
$file = "md$$";
 File::Spec::Functions->import('tmpdir', 'catfile');
 $tmpdir = tmpdir();
} else {
 *catfile = sub { join '/', @_ };
  $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
}
$file = catfile($tmpdir, "md$$");
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
tryout('Memoize::SDBM_File', $file, 1);  # Test 1..4
tryout('Memoize::SDBM_File', $file, 1);  # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag";
1 while unlink $file, "$file.dir", "$file.pag";
(-) perl-5.8.3.orig/lib/Memoize/t/tie_storable.t (-8 / +1 lines)
 Lines 33-46    Link Here 
print "1..4\n";
print "1..4\n";
$file = "storable$$";
if (eval {require File::Spec::Functions}) {
 File::Spec::Functions->import();
} else {
  *catfile = sub { join '/', @_ };
}
$tmpdir = $ENV{TMP} || $ENV{TMPDIR} ||  '/tmp';  
$file = catfile($tmpdir, "storable$$");
1 while unlink $file;
1 while unlink $file;
tryout('Memoize::Storable', $file, 1);  # Test 1..4
tryout('Memoize::Storable', $file, 1);  # Test 1..4
1 while unlink $file;
1 while unlink $file;
(-) perl-5.8.3.orig/lib/Shell.pm (-1 / +1 lines)
 Lines 140-146    Link Here 
    sub ps;
    sub ps;
    print ps -ww;
    print ps -ww;
    cp("/etc/passwd", "/tmp/passwd");
    cp("/etc/passwd", "/etc/passwd.orig");
That's maybe too gonzo.  It actually exports an AUTOLOAD to the current
That's maybe too gonzo.  It actually exports an AUTOLOAD to the current
package (and uncovered a bug in Beta 3, by the way).  Maybe the usual
package (and uncovered a bug in Beta 3, by the way).  Maybe the usual
(-) perl-5.8.3.orig/lib/dotsh.pl (-7 / +5 lines)
 Lines 27-35    Link Here 
#         dependent upon. These variables MUST be defined using shell syntax.
#         dependent upon. These variables MUST be defined using shell syntax.
#
#
#   Example:
#   Example:
#      &dotsh ('/tmp/foo', 'arg1');
#      &dotsh ('/foo/bar', 'arg1');
#      &dotsh ('/tmp/foo');
#      &dotsh ('/foo/bar');
#      &dotsh ('/tmp/foo arg1 ... argN');
#      &dotsh ('/foo/bar arg1 ... argN');
#
#
sub dotsh {
sub dotsh {
   local(@sh) = @_;
   local(@sh) = @_;
 Lines 54-72    Link Here 
      }
      }
   }
   }
   if (length($vars) > 0) {
   if (length($vars) > 0) {
      system "$shell \"$vars;. $command $args; set > /tmp/_sh_env$$\"";
      open (_SH_ENV, "$shell \"$vars && . $command $args && set \" |") || die;
   } else {
   } else {
      system "$shell \". $command $args; set > /tmp/_sh_env$$\"";
      open (_SH_ENV, "$shell \". $command $args && set \" |") || die;
   }
   }
   open (_SH_ENV, "/tmp/_sh_env$$") || die "Could not open /tmp/_sh_env$$!\n";
   while (<_SH_ENV>) {
   while (<_SH_ENV>) {
       chop;
       chop;
       m/^([^=]*)=(.*)/s;
       m/^([^=]*)=(.*)/s;
       $ENV{$1} = $2;
       $ENV{$1} = $2;
   }
   }
   close (_SH_ENV);
   close (_SH_ENV);
   system "rm -f /tmp/_sh_env$$";
   foreach $key (keys(%ENV)) {
   foreach $key (keys(%ENV)) {
       $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
       $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
(-) perl-5.8.3.orig/lib/perl5db.pl (-3 / +3 lines)
 Lines 206-212    Link Here 
=item * noTTY 
=item * noTTY 
if set, goes in NonStop mode.  On interrupt, if TTY is not set,
if set, goes in NonStop mode.  On interrupt, if TTY is not set,
uses the value of noTTY or "/tmp/perldbtty$$" to find TTY using
uses the value of noTTY or "/var/run/perldbtty$$" to find TTY using
Term::Rendezvous.  Current variant is to have the name of TTY in this
Term::Rendezvous.  Current variant is to have the name of TTY in this
file.
file.
 Lines 5689-5696    Link Here 
        else {
        else {
            eval "require Term::Rendezvous;" or die;
            eval "require Term::Rendezvous;" or die;
            # See if we have anything to pass to Term::Rendezvous.
            # See if we have anything to pass to Term::Rendezvous.
            # Use /tmp/perldbtty$$ if not.
            # Use /var/run/perldbtty$$ if not.
            my $rv = $ENV{PERLDB_NOTTY} || "/tmp/perldbtty$$";
            my $rv = $ENV{PERLDB_NOTTY} || "/var/run/perldbtty$$";
            # Rendezvous and get the filehandles.
            # Rendezvous and get the filehandles.
            my $term_rv = new Term::Rendezvous $rv;
            my $term_rv = new Term::Rendezvous $rv;
(-) perl-5.8.3.orig/mpeix/nm (-3 / +3 lines)
 Lines 22-33    Link Here 
# I wanted to pipe this into awk, but it fell victim to a known pipe/streams
# I wanted to pipe this into awk, but it fell victim to a known pipe/streams
# bug on my multiprocessor machine.
# bug on my multiprocessor machine.
callci xeq linkedit.pub.sys \"$LIST\" >/tmp/nm.$$
callci xeq linkedit.pub.sys \"$LIST\" >nm.$$
/bin/awk '\
/bin/awk '\
    / data  univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$5,"extern","data","?"} \
    / data  univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$5,"extern","data","?"} \
    / entry univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$7,"extern","entry","?"}' /tmp/nm.$$
    / entry univ / { printf "%-20s|%10s|%-6s|%-7s|%s\n",$1,$7,"extern","entry","?"}' nm.$$
rm -f /tmp/nm.$$
rm -f nm.$$
exit 0
exit 0
(-) perl-5.8.3.orig/mpeix/relink (-1 / +1 lines)
 Lines 14-20    Link Here 
echo "Creating $RAND.sl...\n"
echo "Creating $RAND.sl...\n"
TEMP=/tmp/perlmpe.$$
TEMP=perlmpe.$$
rm -f $TEMP $RAND.a $RAND.sl
rm -f $TEMP $RAND.a $RAND.sl
(-) perl-5.8.3.orig/perly.fixer (-1 / +1 lines)
 Lines 23-29    Link Here 
input=$1
input=$1
output=$2
output=$2
tmp=/tmp/f$$
tmp=perly$$
inputh=`echo $input|sed 's:\.c$:.h:'`
inputh=`echo $input|sed 's:\.c$:.h:'`
if grep '^#ifdef PERL_CORE' $inputh; then
if grep '^#ifdef PERL_CORE' $inputh; then
(-) perl-5.8.3.orig/pod/perl571delta.pod (-4 / +4 lines)
 Lines 771-787    Link Here 
If your file system supports symbolic links you can build Perl outside
If your file system supports symbolic links you can build Perl outside
of the source directory by
of the source directory by
	mkdir /tmp/perl/build/directory
	mkdir perl/build/directory
	cd /tmp/perl/build/directory
	cd perl/build/directory
	sh /path/to/perl/source/Configure -Dmksymlinks ...
	sh /path/to/perl/source/Configure -Dmksymlinks ...
This will create in /tmp/perl/build/directory a tree of symbolic links
This will create in perl/build/directory a tree of symbolic links
pointing to files in /path/to/perl/source.  The original files are left
pointing to files in /path/to/perl/source.  The original files are left
unaffected.  After Configure has finished you can just say
unaffected.  After Configure has finished you can just say
	make all test
	make all test
and Perl will be built and tested, all in /tmp/perl/build/directory.
and Perl will be built and tested, all in perl/build/directory.
=back
=back
(-) perl-5.8.3.orig/pod/perl58delta.pod (-4 / +4 lines)
 Lines 1905-1921    Link Here 
If your file system supports symbolic links, you can build Perl outside
If your file system supports symbolic links, you can build Perl outside
of the source directory by
of the source directory by
	mkdir /tmp/perl/build/directory
	mkdir perl/build/directory
	cd /tmp/perl/build/directory
	cd perl/build/directory
	sh /path/to/perl/source/Configure -Dmksymlinks ...
	sh /path/to/perl/source/Configure -Dmksymlinks ...
This will create in /tmp/perl/build/directory a tree of symbolic links
This will create in perl/build/directory a tree of symbolic links
pointing to files in /path/to/perl/source.  The original files are left
pointing to files in /path/to/perl/source.  The original files are left
unaffected.  After Configure has finished, you can just say
unaffected.  After Configure has finished, you can just say
	make all test
	make all test
and Perl will be built and tested, all in /tmp/perl/build/directory.
and Perl will be built and tested, all in perl/build/directory.
[561]
[561]
=item *
=item *
(-) perl-5.8.3.orig/pod/perldbmfilter.pod (-2 / +2 lines)
 Lines 91-97    Link Here 
    use Fcntl ;
    use Fcntl ;
    my %hash ;
    my %hash ;
    my $filename = "/tmp/filt" ;
    my $filename = "/var/run/filt" ;
    unlink $filename ;
    unlink $filename ;
    my $db = tie(%hash, 'SDBM_File', $filename, O_RDWR|O_CREAT, 0640)
    my $db = tie(%hash, 'SDBM_File', $filename, O_RDWR|O_CREAT, 0640)
 Lines 137-143    Link Here 
    use warnings ;
    use warnings ;
    use DB_File ;
    use DB_File ;
    my %hash ;
    my %hash ;
    my $filename = "/tmp/filt" ;
    my $filename = "/var/run/filt" ;
    unlink $filename ;
    unlink $filename ;
(-) perl-5.8.3.orig/pod/perldebug.pod (-1 / +1 lines)
 Lines 700-706    Link Here 
with two methods: C<IN> and C<OUT>.  These should return filehandles to use
with two methods: C<IN> and C<OUT>.  These should return filehandles to use
for debugging input and output correspondingly.  The C<new> method should
for debugging input and output correspondingly.  The C<new> method should
inspect an argument containing the value of C<$ENV{PERLDB_NOTTY}> at
inspect an argument containing the value of C<$ENV{PERLDB_NOTTY}> at
startup, or C<"/tmp/perldbtty$$"> otherwise.  This file is not 
startup, or C<"/var/run/perldbtty$$"> otherwise.  This file is not 
inspected for proper ownership, so security hazards are theoretically
inspected for proper ownership, so security hazards are theoretically
possible.
possible.
(-) perl-5.8.3.orig/pod/perlfaq5.pod (-3 / +4 lines)
 Lines 141-146    Link Here 
	    my $count = 0;
	    my $count = 0;
	    until (defined(fileno(FH)) || $count++ > 100) {
	    until (defined(fileno(FH)) || $count++ > 100) {
		$base_name =~ s/-(\d+)$/"-" . (1 + $1)/e;
		$base_name =~ s/-(\d+)$/"-" . (1 + $1)/e;
		# O_EXCL is required for security reasons.
		sysopen(FH, $base_name, O_WRONLY|O_EXCL|O_CREAT);
		sysopen(FH, $base_name, O_WRONLY|O_EXCL|O_CREAT);
	    }
	    }
	    if (defined(fileno(FH))
	    if (defined(fileno(FH))
 Lines 427-434    Link Here 
To open a file without blocking, creating if necessary:
To open a file without blocking, creating if necessary:
    sysopen(FH, "/tmp/somefile", O_WRONLY|O_NDELAY|O_CREAT)
    sysopen(FH, "/foo/somefile", O_WRONLY|O_NDELAY|O_CREAT)
	    or die "can't open /tmp/somefile: $!":
	    or die "can't open /foo/somefile: $!":
Be warned that neither creation nor deletion of files is guaranteed to
Be warned that neither creation nor deletion of files is guaranteed to
be an atomic operation over NFS.  That is, two processes might both
be an atomic operation over NFS.  That is, two processes might both
 Lines 924-930    Link Here 
If you check L<perlfunc/open>, you'll see that several of the ways
If you check L<perlfunc/open>, you'll see that several of the ways
to call open() should do the trick.  For example:
to call open() should do the trick.  For example:
    open(LOG, ">>/tmp/logfile");
    open(LOG, ">>/foo/logfile");
    open(STDERR, ">&LOG");
    open(STDERR, ">&LOG");
Or even with a literal numeric descriptor:
Or even with a literal numeric descriptor:
(-) perl-5.8.3.orig/pod/perlfaq8.pod (-5 / +5 lines)
 Lines 749-758    Link Here 
    while (<PH>) { }                            #    plus a read
    while (<PH>) { }                            #    plus a read
To read both a command's STDOUT and its STDERR separately, it's easiest
To read both a command's STDOUT and its STDERR separately, it's easiest
and safest to redirect them separately to files, and then read from those
to redirect them separately to files, and then read from those files
files when the program is done:
when the program is done:
    system("program args 1>/tmp/program.stdout 2>/tmp/program.stderr");
    system("program args 1>program.stdout 2>program.stderr");
Ordering is important in all these examples.  That's because the shell
Ordering is important in all these examples.  That's because the shell
processes file descriptor redirections in strictly left to right order.
processes file descriptor redirections in strictly left to right order.
 Lines 1063-1070    Link Here 
sysopen():
sysopen():
    use Fcntl;
    use Fcntl;
    sysopen(FH, "/tmp/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644)
    sysopen(FH, "/foo/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644)
        or die "can't open /tmp/somefile: $!":
        or die "can't open /foo/somefile: $!":
=head2 How do I install a module from CPAN?
=head2 How do I install a module from CPAN?
(-) perl-5.8.3.orig/pod/perlfunc.pod (-1 / +1 lines)
 Lines 2928-2934    Link Here 
    open(ARTICLE, "caesar <$article |")		# ditto
    open(ARTICLE, "caesar <$article |")		# ditto
	or die "Can't start caesar: $!";
	or die "Can't start caesar: $!";
    open(EXTRACT, "|sort >/tmp/Tmp$$")		# $$ is our process id
    open(EXTRACT, "|sort >Tmp$$")		# $$ is our process id
	or die "Can't start sort: $!";
	or die "Can't start sort: $!";
    # in memory files
    # in memory files
(-) perl-5.8.3.orig/pod/perlipc.pod (-2 / +2 lines)
 Lines 1030-1036    Link Here 
    use strict;
    use strict;
    my ($rendezvous, $line);
    my ($rendezvous, $line);
    $rendezvous = shift || '/tmp/catsock';
    $rendezvous = shift || 'catsock';
    socket(SOCK, PF_UNIX, SOCK_STREAM, 0)	|| die "socket: $!";
    socket(SOCK, PF_UNIX, SOCK_STREAM, 0)	|| die "socket: $!";
    connect(SOCK, sockaddr_un($rendezvous))	|| die "connect: $!";
    connect(SOCK, sockaddr_un($rendezvous))	|| die "connect: $!";
    while (defined($line = <SOCK>)) {
    while (defined($line = <SOCK>)) {
 Lines 1051-1057    Link Here 
    sub spawn;  # forward declaration
    sub spawn;  # forward declaration
    sub logmsg { print "$0 $$: @_ at ", scalar localtime, "\n" }
    sub logmsg { print "$0 $$: @_ at ", scalar localtime, "\n" }
    my $NAME = '/tmp/catsock';
    my $NAME = 'catsock';
    my $uaddr = sockaddr_un($NAME);
    my $uaddr = sockaddr_un($NAME);
    my $proto = getprotobyname('tcp');
    my $proto = getprotobyname('tcp');
(-) perl-5.8.3.orig/pod/perllexwarn.pod (-2 / +2 lines)
 Lines 381-389    Link Here 
    sub open {
    sub open {
        my $path = shift ;
        my $path = shift ;
        if ($path !~ m#^/#) {
        if ($path !~ m#^/#) {
            warnings::warn("changing relative path to /tmp/")
            warnings::warn("changing relative path to /var/abc")
                if warnings::enabled();
                if warnings::enabled();
            $path = "/tmp/$path" ; 
            $path = "/var/abc/$path";
        }
        }
    }
    }
(-) perl-5.8.3.orig/pod/perlobj.pod (-8 / +8 lines)
 Lines 535-549    Link Here 
    warn "time to die...";
    warn "time to die...";
    exit;
    exit;
When run as F</tmp/test>, the following output is produced:
When run as F</foo/test>, the following output is produced:
    starting program at /tmp/test line 18.
    starting program at /foo/test line 18.
    CREATING SCALAR(0x8e5b8) at /tmp/test line 7.
    CREATING SCALAR(0x8e5b8) at /foo/test line 7.
    CREATING SCALAR(0x8e57c) at /tmp/test line 7.
    CREATING SCALAR(0x8e57c) at /foo/test line 7.
    leaving block at /tmp/test line 23.
    leaving block at /foo/test line 23.
    DESTROYING Subtle=SCALAR(0x8e5b8) at /tmp/test line 13.
    DESTROYING Subtle=SCALAR(0x8e5b8) at /foo/test line 13.
    just exited block at /tmp/test line 26.
    just exited block at /foo/test line 26.
    time to die... at /tmp/test line 27.
    time to die... at /foo/test line 27.
    DESTROYING Subtle=SCALAR(0x8e57c) during global destruction.
    DESTROYING Subtle=SCALAR(0x8e57c) during global destruction.
Notice that "global destruction" bit there?  That's the thread
Notice that "global destruction" bit there?  That's the thread
(-) perl-5.8.3.orig/pod/perlop.pod (-3 / +3 lines)
 Lines 1160-1169    Link Here 
    $output = `cmd 3>&1 1>&2 2>&3 3>&-`;
    $output = `cmd 3>&1 1>&2 2>&3 3>&-`;
To read both a command's STDOUT and its STDERR separately, it's easiest
To read both a command's STDOUT and its STDERR separately, it's easiest
and safest to redirect them separately to files, and then read from those
to redirect them separately to files, and then read from those files
files when the program is done:
when the program is done:
    system("program args 1>/tmp/program.stdout 2>/tmp/program.stderr");
    system("program args 1>program.stdout 2>program.stderr");
Using single-quote as a delimiter protects the command from Perl's
Using single-quote as a delimiter protects the command from Perl's
double-quote interpolation, passing it on to the shell instead:
double-quote interpolation, passing it on to the shell instead:
(-) perl-5.8.3.orig/pod/perlopentut.pod (-4 / +4 lines)
 Lines 192-202    Link Here 
    open(WTMP, "+< /usr/adm/wtmp") 
    open(WTMP, "+< /usr/adm/wtmp") 
        || die "can't open /usr/adm/wtmp: $!";
        || die "can't open /usr/adm/wtmp: $!";
    open(SCREEN, "+> /tmp/lkscreen")
    open(SCREEN, "+> lkscreen")
        || die "can't open /tmp/lkscreen: $!";
        || die "can't open lkscreen: $!";
    open(LOGFILE, "+>> /tmp/applog"
    open(LOGFILE, "+>> /var/log/applog"
        || die "can't open /tmp/applog: $!";
        || die "can't open /var/log/applog: $!";
The first one won't create a new file, and the second one will always
The first one won't create a new file, and the second one will always
clobber an old one.  The third one will create a new file if necessary
clobber an old one.  The third one will create a new file if necessary
(-) perl-5.8.3.orig/utils/c2ph.PL (-8 / +16 lines)
 Lines 280-285    Link Here 
$RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $';
$RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $';
use File::Temp;
######################################################################
######################################################################
 Lines 480-485    Link Here 
    printf "%-16s%-15s  %s\n", $var, eval "\$$var", $msg;
    printf "%-16s%-15s  %s\n", $var, eval "\$$var", $msg;
}
}
sub safedir {
    $SAFEDIR = File::Temp::tempdir("c2ph.XXXXXX", TMPDIR => 1, CLEANUP => 1)
      unless (defined($SAFEDIR));
}
undef $SAFEDIR;
$recurse = 1;
$recurse = 1;
if (@ARGV) {
if (@ARGV) {
 Lines 495-509    Link Here 
    }
    }
    elsif (@ARGV == 1 && $ARGV[0] =~ /\.c$/) {
    elsif (@ARGV == 1 && $ARGV[0] =~ /\.c$/) {
	local($dir, $file) = $ARGV[0] =~ m#(.*/)?(.*)$#;
	local($dir, $file) = $ARGV[0] =~ m#(.*/)?(.*)$#;
	$chdir = "cd $dir; " if $dir;
	$chdir = "cd $dir && " if $dir;
	&system("$chdir$CC $CFLAGS $DEFINES $file") && exit 1;
	&system("$chdir$CC $CFLAGS $DEFINES $file") && exit 1;
	$ARGV[0] =~ s/\.c$/.s/;
	$ARGV[0] =~ s/\.c$/.s/;
    }
    }
    else {
    else {
	$TMPDIR = tempdir(CLEANUP => 1);
	&safedir;
	$TMP = "$TMPDIR/c2ph.$$.c";
	$TMP = "$SAFEDIR/c2ph.$$.c";
	&system("cat @ARGV > $TMP") && exit 1;
	&system("cat @ARGV > $TMP") && exit 1;
	&system("cd $TMPDIR; $CC $CFLAGS $DEFINES $TMP") && exit 1;
	&system("cd $SAFEDIR && $CC $CFLAGS $DEFINES $TMP") && exit 1;
	unlink $TMP;
	unlink $TMP;
	$TMP =~ s/\.c$/.s/;
	$TMP =~ s/\.c$/.s/;
	@ARGV = ($TMP);
	@ARGV = ($TMP);
 Lines 1274-1281    Link Here 
}
}
sub compute_intrinsics {
sub compute_intrinsics {
    $TMPDIR ||= tempdir(CLEANUP => 1);
    &safedir;
    local($TMP) = "$TMPDIR/c2ph-i.$$.c";
    local($TMP) = "$SAFEDIR/c2ph-i.$$.c";
    open (TMP, ">$TMP") || die "can't open $TMP: $!";
    open (TMP, ">$TMP") || die "can't open $TMP: $!";
    select(TMP);
    select(TMP);
 Lines 1303-1309    Link Here 
    close TMP;
    close TMP;
    select(STDOUT);
    select(STDOUT);
    open(PIPE, "cd $TMPDIR && $CC $TMP && $TMPDIR/a.out|");
    open(PIPE, "cd $SAFEDIR && $CC $TMP && $SAFEDIR/a.out|");
    while (<PIPE>) {
    while (<PIPE>) {
	chop;
	chop;
	split(' ',$_,2);;
	split(' ',$_,2);;
 Lines 1312-1318    Link Here 
	$intrinsics{$_[1]} = $template{$_[0]};
	$intrinsics{$_[1]} = $template{$_[0]};
    }
    }
    close(PIPE) || die "couldn't read intrinsics!";
    close(PIPE) || die "couldn't read intrinsics!";
    unlink($TMP, '$TMPDIR/a.out');
    unlink($TMP, '$SAFEDIR/a.out');
    print STDERR "done\n" if $trace;
    print STDERR "done\n" if $trace;
}
}
(-) perl-5.8.3.orig/utils/perlbug.PL (-5 / +4 lines)
 Lines 78-84    Link Here 
print OUT <<'!NO!SUBS!';
print OUT <<'!NO!SUBS!';
use Config;
use Config;
use File::Spec;		# keep perlbug Perl 5.005 compatible
use File::Temp;
use Getopt::Std;
use Getopt::Std;
use strict;
use strict;
 Lines 958-967    Link Here 
}
}
sub filename {
sub filename {
    my $dir = File::Spec->tmpdir();
    my ($fh, $filename) = File::Temp::tempfile(UNLINK => 1);
    $filename = "bugrep0$$";
    close($fh);
    $filename++ while -e File::Spec->catfile($dir, $filename);
    return $filename;
    $filename = File::Spec->catfile($dir, $filename);
}
}
sub paraprint {
sub paraprint {