Skip to content

Commit

Permalink
perlbug: Allow noninteractive use in test mode (-t option)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ntyni authored and arc committed May 16, 2016
1 parent 965f951 commit fdfa330
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/perlbug.PL
Expand Up @@ -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.
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit fdfa330

Please sign in to comment.