X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fperlbug.PL;h=c4289f8d3af67ef41dec1ea7c2689956e4683e65;hb=2facaf7c4dbd4158cb2080211e446e7fc84d66d8;hp=d9389ce7d14ee6d66e9ddf43ceba65dd86c5943f;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/perlbug.PL b/utils/perlbug.PL index d9389ce..c4289f8 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -91,7 +91,7 @@ BEGIN { $::HaveUtil = ($@ eq ""); }; -my $Version = "1.31"; +my $Version = "1.33"; # Changed in 1.06 to skip Mail::Send and Mail::Util if not available. # Changed in 1.07 to see more sendmail execs, and added pipe output. @@ -127,6 +127,8 @@ my $Version = "1.31"; # Changed in 1.29 Perlbug(tron): auto(-ok), short prompts RFOLEY 05-05-2000 # Changed in 1.30 Added warnings on failure to open files MSTEVENS 13-07-2000 # Changed in 1.31 Add checks on close().Fix my $var unless. TJENNESS 26-07-2000 +# Changed in 1.32 Use File::Spec->tmpdir TJENNESS 20-08-2000 +# Changed in 1.33 Don't require -t STDOUT for -ok. # TODO: - Allow the user to re-name the file on mail failure, and # make sure failure (transmission-wise) of Mail::Send is @@ -134,7 +136,7 @@ my $Version = "1.31"; # - Test -b option my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename, - $subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity, + $subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity, $fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP, $ok); my $perl_version = $^V ? sprintf("v%vd", $^V) : $]; @@ -152,7 +154,6 @@ include a file, you can use the -f switch. EOF die "\n"; } -if (!-t STDOUT && !$outfile) { Dump(*STDOUT); exit; } Query(); Edit() unless $usefile || ($ok and not $::opt_n); @@ -173,9 +174,9 @@ sub ask_for_alternatives { # (category|severity) 'default' => 'low', 'ok' => 'none', 'opts' => [qw(critical high medium low wishlist none)], # zero - }, + }, ); - die "Invalid alternative($name) requested\n" unless grep(/^$name$/, keys %alts); + die "Invalid alternative($name) requested\n" unless grep(/^$name$/, keys %alts); my $alt = ""; if ($ok) { $alt = $alts{$name}{'ok'}; @@ -214,7 +215,7 @@ sub Init { MacPerl::Ask('Provide command-line args here (-h for help):') if $Is_MacOS && $MacPerl::Version =~ /App/; - if (!getopts("dhva:s:b:f:F:r:e:SCc:to:n:")) { Help(); exit; }; + if (!getopts("Adhva:s:b:f:F:r:e:SCc:to:n:")) { Help(); exit; }; # This comment is needed to notify metaconfig that we are # using the $perladmin, $cf_by, and $cf_time definitions. @@ -222,7 +223,7 @@ sub Init { # -------- Configuration --------- # perlbug address - $perlbug = 'perlbug@perl.com'; + $perlbug = 'perlbug@perl.org'; # Test address $testaddress = 'perlbug-test@perl.com'; @@ -573,6 +574,13 @@ sub Dump { Flags: category=$category severity=$severity +EFF + if ($::opt_A) { + print OUT <ile/ve - print "\n\nName of file to save message in [perlbug.rep]: "; + my $file_save = $outfile || "perlbug.rep"; + print "\n\nName of file to save message in [$file_save]: "; my $file = scalar <>; chop $file; - $file = "perlbug.rep" if $file eq ""; + $file = $file_save if $file eq ""; unless (open(FILE, ">$file")) { print "\nError opening $file: $!\n\n"; @@ -768,7 +777,7 @@ EOF Edit(); } elsif ($action =~ /^[qc]/i) { # ancel, uit Cancel(); - } elsif ($action =~ /^s/) { + } elsif ($action =~ /^s/i) { paraprint <tmpdir(); $filename = "bugrep0$$"; -# $dir .= "\\" if $Is_MSWin32 and $dir !~ m|[\\/]$|; $filename++ while -e File::Spec->catfile($dir, $filename); $filename = File::Spec->catfile($dir, $filename); } @@ -942,10 +947,10 @@ B S<[ B<-v> ]> S<[ B<-a> I
]> S<[ B<-s> I ]> S<[ B<-b> I | B<-f> I ]> S<[ B<-F> I ]> S<[ B<-r> I ]> S<[ B<-e> I ]> S<[ B<-c> I | B<-C> ]> -S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-h> ]> +S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]> B S<[ B<-v> ]> S<[ B<-r> I ]> -S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]> + S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]> =head1 DESCRIPTION @@ -963,7 +968,7 @@ will be needed. Simply run it, and follow the prompts. If you are unable to run B (most likely because you don't have a working setup to send mail that perlbug recognizes), you may have to -compose your own report, and email it to B. You might +compose your own report, and email it to B. You might find the B<-d> option useful to get summary information in that case. In any case, when reporting a bug, please make sure you have run through @@ -1041,7 +1046,7 @@ definitely be fixed. Use the C program to generate your patches (C is being maintained by the GNU folks as part of the B package, so you should be able to get it from any of the GNU software repositories). If you do submit a patch, the cool-dude counter at -perlbug@perl.com will register you as a savior of the world. Your +perlbug@perl.org will register you as a savior of the world. Your patch may be returned with requests for changes, or requests for more detailed explanations about your fix. @@ -1061,7 +1066,7 @@ B will, amongst other things, ensure your report includes crucial information about your version of perl. If C is unable to mail your report after you have typed it in, you may have to compose the message yourself, add the output produced by C and email -it to B. If, for some reason, you cannot run +it to B. If, for some reason, you cannot run C at all on your system, be sure to include the entire output produced by running C (note the uppercase V). @@ -1088,7 +1093,14 @@ version of perl comes out and your bug is still present. =item B<-a> -Address to send the report to. Defaults to `perlbug@perl.com'. +Address to send the report to. Defaults to `perlbug@perl.org'. + +=item B<-A> + +Don't send a bug received acknowledgement to the reply address. +Generally it is only a sensible to use this option if you are a +perl maintainer actively watching perl porters for your message to +arrive. =item B<-b>