From 64233e6d87994bdda47bfaaf154d55ad8d7802c2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Mar 2021 07:08:23 +0000 Subject: lei_input: avoid special case sub for --stdin We can consistently open /dev/stdin correctly nowadays, so drop the input_stdin and just use the normal ->path_to_fd code path. --- lib/PublicInbox/LeiInput.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/PublicInbox/LeiInput.pm') diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index d916249a..93284e8b 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -46,12 +46,6 @@ error reading $name: $! } } -sub input_stdin { - my ($self) = @_; - my $in = delete $self->{0} or return; - $self->input_fh($self->{lei}->{opt}->{'in-format'}, $in, ''); -} - sub input_path_url { my ($self, $input, @args) = @_; my $lei = $self->{lei}; @@ -94,7 +88,7 @@ sub prepare_inputs { # returns undef on error @$inputs and return $lei->fail("--stdin and @$inputs do not mix"); check_input_format($lei) or return; - $self->{0} = $lei->{0}; + push @$inputs, '/dev/stdin'; } my $net = $lei->{net}; # NetWriter may be created by l2m my $fmt = $lei->{opt}->{'in-format'}; -- cgit v1.2.3-24-ge0c7