From 1ec03f31c05cb7b2516d0c8aa2de76b8de1495ee Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 6 Feb 2000 13:58:31 +0000 Subject: [PATCH] make perlbug use new-style version numbers; improve compatibility (runs with perl 5.005); fix swapped old vs new version reporting p4raw-id: //depot/perl@4999 --- utils/perlbug.PL | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/utils/perlbug.PL b/utils/perlbug.PL index c46df79..97f8d86 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -57,12 +57,14 @@ print "Extracting $file (with variable substitutions)\n"; # In this section, perl variables will be expanded during extraction. # You can use $Config{...} to use Configure variables. +my $extract_version = sprintf("v%v", $^V); + print OUT <<"!GROK!THIS!"; $Config{startperl} eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' if \$running_under_some_shell; -my \$config_tag1 = '$] - $Config{cf_time}'; +my \$config_tag1 = '$extract_version - $Config{cf_time}'; my \$patchlevel_date = $patchlevel_date; my \$patch_tags = '$patch_tags'; @@ -76,7 +78,7 @@ my \@patches = ( print OUT <<'!NO!SUBS!'; use Config; -use File::Spec::Functions; +use File::Spec; # keep perlbug Perl 5.005 compatible use Getopt::Std; use strict; @@ -131,7 +133,9 @@ my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename, $subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP, $ok); -my $config_tag2 = "$] - $Config{cf_time}"; +my $perl_version = $^V ? sprintf("v%v", $^V) : $]; + +my $config_tag2 = "$perl_version - $Config{cf_time}"; Init(); @@ -242,7 +246,7 @@ EOF $::opt_C = 1; # don't send a copy to the local admin $::opt_s = 1; # we have a subject line $subject = ($::opt_n ? 'Not ' : '') - . "OK: perl $] ${patch_tags}on" + . "OK: perl $perl_version ${patch_tags}on" ." $::Config{'archname'} $::Config{'osvers'} $subject"; $ok = 1; } else { @@ -470,7 +474,7 @@ EOF print REP <catfile($dir, $filename); + $filename = File::Spec->catfile($dir, $filename); } sub paraprint { -- 2.7.4