diff options
author | Eric Wong <e@80x24.org> | 2021-02-02 22:11:36 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-04 01:37:09 +0000 |
commit | c7420334c0d69bf948ad670c822753334e4664a8 (patch) | |
tree | 335798bdb7015caa87aa20c83f8abd541221e622 /lib/PublicInbox | |
parent | 18b11d373c104eef01a0366a63b1c841c5e57ff5 (diff) | |
download | public-inbox-c7420334c0d69bf948ad670c822753334e4664a8.tar.gz |
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 9afc90cf..9b4d4e0b 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -308,12 +308,12 @@ sub x_it ($$) { sub err ($;@) { my $self = shift; my $err = $self->{2} // ($self->{pgr} // [])->[2] // *STDERR{GLOB}; - my $eor = (substr($_[-1], -1, 1) eq "\n" ? () : "\n"); - print $err @_, $eor and return; + my @eor = (substr($_[-1]//'', -1, 1) eq "\n" ? () : ("\n")); + print $err @_, @eor and return; my $old_err = delete $self->{2}; - close($old_err) if $! == EPIPE && $old_err;; + close($old_err) if $! == EPIPE && $old_err; $err = $self->{2} = ($self->{pgr} // [])->[2] // *STDERR{GLOB}; - print $err @_, $eor or print STDERR @_, $eor; + print $err @_, @eor or print STDERR @_, @eor; } sub qerr ($;@) { $_[0]->{opt}->{quiet} or err(shift, @_) } |