[perl #74856] Fix POD syntax in perlapi
[p5sagit/p5-mst-13.2.git] / utils / perlbug.PL
index c86478a..184c016 100644 (file)
@@ -41,6 +41,8 @@ my @patches;
 while (<PATCH_LEVEL>) {
     last if /^\s*}/;
     next if /^\s*#/;  # preprocessor stuff
+    next if /PERL_GIT_UNPUSHED_COMMITS/;    # XXX expand instead
+    next if /"uncommitted-changes"/;        # XXX determine if active instead
     chomp;
     s/^\s+,?\s*"?//;
     s/"?\s*,?$//;
@@ -458,7 +460,7 @@ EOF
        # Try and guess return address
        my $guess;
 
-       $guess = $ENV{'REPLY-TO'} || $ENV{'REPLYTO'} || '';
+       $guess = $ENV{'REPLY-TO'} || $ENV{'REPLYTO'} || $ENV{'EMAIL'} || '';
         if ($Is_MacOS) {
             require Mac::InternetConfig;
             $guess = $Mac::InternetConfig::InternetConfig{
@@ -604,6 +606,12 @@ for $entry on http://rt.cpan.org, and report your issue there.
 EOF
 
             $entry = '';
+       } elsif (my $bug_tracker = $Module::CoreList::bug_tracker{$entry}) {
+               paraprint <<"EOF";
+$entry included with core Perl is copied directly from the CPAN distribution.
+Please report bugs in $entry directly to its maintainers using $bug_tracker
+EOF
+            $entry = '';
         } elsif ($entry) {
                $category ||= 'library';
                $report_about_module = $entry;
@@ -863,7 +871,7 @@ sub NowWhat {
 You have finished composing your message. At this point, you have 
 a few options. You can:
 
-    * [Se]end the message to $address$andcc, 
+    * [Se]nd the message to $address$andcc, 
     * [D]isplay the message on the screen,
     * [R]e-edit the message
     * Display or change the message's [su]bject
@@ -1126,7 +1134,7 @@ sub _send_message_mailsend {
     open(REP, "<$filename") or die "Couldn't open '$filename': $!\n";
     while (<REP>) { print $fh $_ }
     close(REP) or die "Error closing $filename: $!";
-    $fh->close;
+    $fh->close or die "Error sending mail: $!";
 
     print "\nMessage sent.\n";
 }
@@ -1151,9 +1159,15 @@ sub _probe_for_sendmail {
 sub _send_message_sendmail {
     my $sendmail = _probe_for_sendmail();
     unless ($sendmail) {
-        paraprint(<<"EOF"), die "\n";
+        my $message_start = !$Is_Linux && !$Is_OpenBSD ? <<'EOT' : <<'EOT';
 It appears that there is no program which looks like "sendmail" on
 your system and that the Mail::Send library from CPAN isn't available.
+EOT
+It appears that there is no program which looks like "sendmail" on
+your system.
+EOT
+        paraprint(<<"EOF"), die "\n";
+$message_start
 Because of this, there's no easy way to automatically send your
 message.
 
@@ -1216,11 +1230,13 @@ B<perlbug> S<[ B<-v> ]> S<[ B<-a> I<address> ]> S<[ B<-s> I<subject> ]>
 S<[ B<-b> I<body> | B<-f> I<inputfile> ]> S<[ B<-F> I<outputfile> ]>
 S<[ B<-r> I<returnaddress> ]>
 S<[ B<-e> I<editor> ]> S<[ B<-c> I<adminaddress> | B<-C> ]>
-S<[ B<-S> ]> S<[ B<-t> ]>  S<[ B<-d> ]>  S<[ B<-A> ]>  S<[ B<-h> ]>
+S<[ B<-S> ]> S<[ B<-t> ]>  S<[ B<-d> ]>  S<[ B<-A> ]>  S<[ B<-h> ]> S<[ B<-T> ]>
 
 B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
  S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
 
+B<perlthanks>
+
 =head1 DESCRIPTION
 
 
@@ -1301,7 +1317,7 @@ L<perldebug>.
 =item Do you have a proper test case?
 
 The easier it is to reproduce your bug, the more likely it will be
-fixed --  if nobody can duplicate your problem, it probably won't be 
+fixed -- if nobody can duplicate your problem, it probably won't be 
 addressed.
 
 A good test case has most of these attributes: short, simple code;
@@ -1371,6 +1387,12 @@ your Subject line informative.  "a bug" is not informative.  Neither
 is "perl crashes" nor is "HELP!!!".  These don't help.  A compact
 description of what's wrong is fine.
 
+=item Can you use C<perlbug> to submit a thank-you note?
+
+Yes, you can do this by either using the C<-T> option, or by invoking
+the program as C<perlthanks>. Thank-you notes are good. It makes people
+smile. 
+
 =back
 
 Having done your bit, please be prepared to wait, to be told the
@@ -1490,6 +1512,10 @@ supply one on the command line.
 
 Test mode.  The target address defaults to B<perlbug-test@perl.org>.
 
+=item B<-T>
+
+Send a thank-you note instead of a bug report. 
+
 =item B<-v>
 
 Include verbose configuration data in the report.