From: Nicholas Clark Date: Mon, 25 Feb 2008 23:29:33 +0000 (+0000) Subject: Also install perlbug as perlthanks, to make it easy for people to send X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=721e227587e663bfecde1337f7d0f687dfd7b9bb;p=p5sagit%2Fp5-mst-13.2.git Also install perlbug as perlthanks, to make it easy for people to send their appreciation to perl-thanks@perl.org. It would be nice to get feedback other than bug reports. p4raw-id: //depot/perl@33371 --- diff --git a/utils.lst b/utils.lst index 4e88e43..b92c513 100644 --- a/utils.lst +++ b/utils.lst @@ -15,7 +15,7 @@ utils/h2ph utils/h2xs utils/instmodsh utils/libnetcfg -utils/perlbug +utils/perlbug # link = utils/perlthanks utils/perldoc # pod = pod/perldoc.pod utils/perlivp utils/piconv diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 5190439..23e1e03 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -81,10 +81,11 @@ my \@patches = ( print OUT <<'!NO!SUBS!'; +use strict; use Config; use File::Spec; # keep perlbug Perl 5.005 compatible use Getopt::Std; -use strict; +use File::Basename 'basename'; sub paraprint; @@ -147,10 +148,10 @@ my $Version = "1.36"; # accounted for. # - Test -b option -my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename, $messageid, $domain, - $subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity, - $fh, $me, $Is_MSWin32, $Is_Linux, $Is_VMS, $msg, $body, $andcc, %REP, $ok, - $Is_OpenBSD); +my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress, + $filename, $messageid, $domain, $subject, $from, $verbose, $ed, $outfile, + $Is_MacOS, $category, $severity, $fh, $me, $Is_MSWin32, $Is_Linux, $Is_VMS, + $msg, $body, $andcc, %REP, $ok, $thanks, $Is_OpenBSD, $progname); my $perl_version = $^V ? sprintf("%vd", $^V) : $]; @@ -161,8 +162,8 @@ Init(); if ($::opt_h) { Help(); exit; } if ($::opt_d) { Dump(*STDOUT); exit; } if (!-t STDIN && !($ok and not $::opt_n)) { - paraprint < { 'default' => 'core', 'ok' => 'install', + # Inevitably some of these will end up in RT whatever we do: + 'thanks' => 'thanks', 'opts' => [qw(core docs install library utilities)], # patch, notabug }, 'severity' => { 'default' => 'low', 'ok' => 'none', + 'ok' => 'none', 'opts' => [qw(critical high medium low wishlist none)], # zero }, ); die "Invalid alternative($name) requested\n" unless grep(/^$name$/, keys %alts); my $alt = ""; - if ($ok) { - $alt = $alts{$name}{'ok'}; + my $what = $ok || $thanks; + if ($what) { + $alt = $alts{$name}{$what}; } else { my @alts = @{$alts{$name}{'opts'}}; paraprint <; chomp $subject; if ($err++ == 5) { - die "Aborting.\n"; + if ($thanks) { + $subject = 'Thanks for Perl'; + } else { + die "Aborting.\n"; + } } } while (TrivialSubject($subject)); } @@ -472,7 +513,30 @@ EOF # Prompt for editor, if no override is given editor: unless ($::opt_e || $::opt_f || $::opt_b) { - paraprint <; chomp $entry; @@ -506,7 +566,7 @@ EOF } } my $report_about_module = ''; - if ($::HaveCoreList && !$ok) { + if ($::HaveCoreList && !$ok && !$thanks) { paraprint <$filename") or die "Unable to create report file `$filename': $!\n"; - my $reptype = !$ok ? "bug" : $::opt_n ? "build failure" : "success"; + my $reptype = !$ok ? ($thanks ? 'thank-you' : 'bug') + : $::opt_n ? "build failure" : "success"; print REP <ile/ve - my $file_save = $outfile || "perlbug.rep"; + my $file_save = $outfile || "$progname.rep"; print "\n\nName of file to save message in [$file_save]: "; my $file = scalar <>; chomp $file; @@ -975,6 +1049,7 @@ Options: this if you don't give it here. -e Editor to use. -t Test mode. The target address defaults to `$testaddress'. + -T Thank-you mode. The target address defaults to -d Data mode. This prints out your configuration data, without mailing anything. You can use this with -v to get more complete data. -A Don't send a bug received acknowledgement to the return address.