In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/24963b0a8d4dddbe29a3709011cab46fdc3deee1?hp=72e11947ab9e3d00b1e7fb7fd4f7bbbaa9d8b69d>
- Log ----------------------------------------------------------------- commit 24963b0a8d4dddbe29a3709011cab46fdc3deee1 Author: Aaron Crane <[email protected]> Date: Tue May 17 12:24:54 2016 +0100 perlbug: don't run editor when noninteractive This fixes tests on Win32. ----------------------------------------------------------------------- Summary of changes: utils/perlbug.PL | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 6290ca7..720cf12 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -95,6 +95,8 @@ my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress, %opt, $have_attachment, $attachments, $has_patch, $mime_boundary ); +my $running_noninteractively = !-t STDIN; + my $perl_version = $^V ? sprintf("%vd", $^V) : $]; my $config_tag2 = "$perl_version - $Config{cf_time}"; @@ -103,7 +105,7 @@ Init(); if ($opt{h}) { Help(); exit; } if ($opt{d}) { Dump(*STDOUT); exit; } -if (!-t STDIN && !$opt{t} && !($ok and not $opt{n})) { +if ($running_noninteractively && !$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. @@ -753,7 +755,7 @@ sub Edit { $ed = $entry unless $entry eq ''; } - _edit_file($ed); + _edit_file($ed) unless $running_noninteractively; } sub _edit_file { -- Perl5 Master Repository
