diff options
author | Eric Wong <e@80x24.org> | 2020-12-27 02:53:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-28 23:19:47 +0000 |
commit | 645ec505c03c86ed4500151737bcf3d636d9b18b (patch) | |
tree | 0aa59d53ff712d476da3ec825752fc53bef1966e /lib/PublicInbox/Git.pm | |
parent | 5f875446975b1473c1ffd7196e572e13d58ba56f (diff) | |
download | public-inbox-645ec505c03c86ed4500151737bcf3d636d9b18b.tar.gz |
We can use the ternary operator to avoid an early return, here
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 08406925..73dc7d3e 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -362,10 +362,8 @@ sub popen { sub qx { my ($self, @cmd) = @_; my $fh = $self->popen(@cmd); - local $/ = "\n"; - return <$fh> if wantarray; - local $/; - <$fh> + local $/ = wantarray ? "\n" : undef; + <$fh>; } # check_async and cat_async may trigger the other, so ensure they're |