diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perlbug.PL | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 6290ca76e8..720cf1203f 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 { |