summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@debian.org>2016-05-01 20:02:49 +0300
committerAaron Crane <arc@cpan.org>2016-05-16 13:29:46 +0100
commitfdfa33076f4f175751eccfb62ebb0c926a6307b0 (patch)
tree46c169467c833a65129e801fce3efdafc1419d53 /utils
parent965f9517a764238c745d253495e1c1ef8403b65c (diff)
downloadperl-fdfa33076f4f175751eccfb62ebb0c926a6307b0.tar.gz
perlbug: Allow noninteractive use in test mode (-t option)
This is groundworks for perlbug unit tests. Not all of the interactive questions can be overridden on the command line, so we will have to pipe in commands. Adapt the test mode ("-t"), which used to just override the recipient address, for this rather than inventing one more new option.
Diffstat (limited to 'utils')
-rw-r--r--utils/perlbug.PL4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index 885785ae00..caac732c73 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -101,7 +101,7 @@ Init();
if ($opt{h}) { Help(); exit; }
if ($opt{d}) { Dump(*STDOUT); exit; }
-if (!-t STDIN && !($ok and not $opt{n})) {
+if (!-t STDIN && !$opt{t} && !($ok and not $opt{n})) {
paraprint <<"EOF";
Please use $progname interactively. If you want to
include a file, you can use the -f switch.
@@ -1526,6 +1526,8 @@ supply one on the command line.
=item B<-t>
Test mode. The target address defaults to B<perlbug-test@perl.org>.
+Also makes it possible to command perlbug from a pipe or file, for
+testing purposes.
=item B<-T>