diff options
author | Alexandr Ciornii <alexchorny@gmail.com> | 2007-07-12 16:46:24 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-12 16:22:59 +0000 |
commit | 13f4c5e485d010d93c3fcebf4b4abd62f988e9fd (patch) | |
tree | fa0aaac59486921cafba5cf5d712225aa4865e39 /utils/perlbug.PL | |
parent | f6cadd99efcbcccf4c62eca5ed07c1830da2e286 (diff) | |
download | perl-13f4c5e485d010d93c3fcebf4b4abd62f988e9fd.tar.gz |
perlbug
Message-ID: <1367844687.20070712134624@gmail.com>
p4raw-id: //depot/perl@31599
Diffstat (limited to 'utils/perlbug.PL')
-rw-r--r-- | utils/perlbug.PL | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL index de94e6e13d..c288095a20 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -96,9 +96,11 @@ BEGIN { # use secure tempfiles wherever possible eval "require File::Temp;"; $::HaveTemp = ($@ eq ""); + eval { require Module::CoreList; }; + $::HaveCoreList = ($@ eq ""); }; -my $Version = "1.35"; +my $Version = "1.36"; # 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. @@ -138,6 +140,7 @@ my $Version = "1.35"; # Changed in 1.33 Don't require -t STDOUT for -ok. # Changed in 1.34 Added Message-Id RFOLEY 18-06-2002 # Changed in 1.35 Use File::Temp (patch from Solar Designer) NWCLARK 28-02-2004 +# Changed in 1.36 Initial Module::CoreList support Alexandr Ciornii 11-07-2007 # TODO: - Allow the user to re-name the file on mail failure, and # make sure failure (transmission-wise) of Mail::Send is @@ -502,6 +505,29 @@ EOF $ed = $entry; } } + my $report_about_module = ''; + if ($::HaveCoreList) { + paraprint <<EOF; +Is your report about a Perl module? If yes, enter its name. If not, skip. +EOF + print "Module []: "; + my $entry = scalar <>; + $entry =~ s/^\s+//s; + $entry =~ s/\s+$//s; + if ($entry ne q{}) { + $category ||= 'library'; + $report_about_module = $entry; + my $first_release = Module::CoreList->first_release($entry); + unless ($first_release) { + paraprint <<EOF; +Module $entry is not a core module. Please check that +you entered its name correctly. If it is correct, +abort this program, try searching for $entry on +search.cpan.org, and report it there. +EOF + } + } + } # Prompt for category of bug $category ||= ask_for_alternatives('category'); |