Subject: | Minor makepatch issues |
The attached patch solves some minor issues with makepatch:
- it ceases the "parameterless use IO is deprecated" warning
- it ceases the "pseudo hashes depreacted" warning
- makepatch now uses File::Spec->tmpdir to find a temporary directory.
Maybe this should also be protected by a File::Spec->can("tmpdir"); I
don't know if the tmpdir method was always part of File::Spec
Regards,
Slaven
Subject: | makepatch-20012.diff |
#
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####
#### Patch data follows ####
diff -up 'build/makepatch-2.00_12/Makefile.PL' 'new.build/makepatch-2.00_12/Makefile.PL'
Index: ./Makefile.PL
--- ./Makefile.PL Thu Mar 25 17:00:45 2004
+++ ./Makefile.PL Sat Sep 9 22:24:22 2006
@@ -11,7 +11,7 @@ require 5.004;
# Verify CORE modules.
use Getopt::Long 2.00;
-use IO;
+use IO qw(File);
use File::Basename;
use File::Spec;
use Config;
@@ -55,7 +55,7 @@ you must install a better version of 'pa
EOD
}
-my $TMPDIR = $ENV{"TMPDIR"} || $ENV{TEMP} || "/usr/tmp";
+my $TMPDIR = $ENV{"TMPDIR"} || $ENV{TEMP} || File::Spec->tmpdir || "/usr/tmp";
unless ( -d $TMPDIR && -w $TMPDIR ) {
print STDERR <<EOD;
The default location for temporary files ($TMPDIR) does not
diff -up 'build/makepatch-2.00_12/script/makepatch' 'new.build/makepatch-2.00_12/script/makepatch'
Index: ./script/makepatch
Prereq: 1.132
--- ./script/makepatch Thu Mar 25 16:59:43 2004
+++ ./script/makepatch Sat Sep 9 22:24:32 2006
@@ -11,7 +11,7 @@ my $RCS_Id = '$Id: makepatch.pl,v 1.132
use strict;
use Getopt::Long 2.00;
-use IO;
+use IO qw(File);
use File::Basename;
use File::Spec;
use File::Path;
@@ -62,7 +62,7 @@ my $opt_test = 0; # testing
my $exclude_pat; # regex to exclude
my @workq = (); # pre/post work
-my $TMPDIR = $ENV{"TMPDIR"} || $ENV{TEMP} || "/usr/tmp";
+my $TMPDIR = $ENV{"TMPDIR"} || $ENV{TEMP} || File::Spec->tmpdir || "/usr/tmp";
my $dot_u = File::Spec::Unix->curdir; # UNIX current dir
my $dot = File::Spec->curdir; # current dir
my $dotdot = File::Spec->updir; # parent dir
@@ -181,7 +181,7 @@ $SIG{QUIT} = \&cleanup;
# The arguments.
my ($old, $new);
-if ( $] >= 5.005 ) {
+if ( $] >= 5.005 && $] < 5.008) {
# Use pseudo-hashes if possible.
my %fields = ( tag => 1, # old/new
name => 2, # given name on command line
#### End of Patch data ####
#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Sat Sep 9 22:26:24 2006
# Generated by : makepatch 2.00_12*
# Recurse directories : Yes
# Excluded files : (\A|/).*\~\Z
# (\A|/).*\.a\Z
# (\A|/).*\.bak\Z
# (\A|/).*\.BAK\Z
# (\A|/).*\.elc\Z
# (\A|/).*\.exe\Z
# (\A|/).*\.gz\Z
# (\A|/).*\.ln\Z
# (\A|/).*\.o\Z
# (\A|/).*\.obj\Z
# (\A|/).*\.olb\Z
# (\A|/).*\.old\Z
# (\A|/).*\.orig\Z
# (\A|/).*\.rej\Z
# (\A|/).*\.so\Z
# (\A|/).*\.Z\Z
# (\A|/)\.del\-.*\Z
# (\A|/)\.make\.state\Z
# (\A|/)\.nse_depinfo\Z
# (\A|/)core\Z
# (\A|/)tags\Z
# (\A|/)TAGS\Z
# p 'Makefile.PL' 2802 1157833462 0100640
# p 'script/makepatch' 57351 1157833472 0100755
#### End of ApplyPatch data ####
#### End of Patch kit [created: Sat Sep 9 22:26:24 2006] ####
#### Patch checksum: 89 3078 8999 ####
#### Checksum: 107 3701 60504 ####