From: Eric Wong Date: Sat, 18 Jan 2025 01:26:03 +0000 (+0000) Subject: inbox_writable: use autodie::open X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6570afb89e364b6ecdb183e234bce581aa1345c4;p=thirdparty%2Fpublic-inbox.git inbox_writable: use autodie::open autodie should give us more consistent error reporting going forward. --- diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm index 18412cc3f..f391d7ee2 100644 --- a/lib/PublicInbox/InboxWritable.pm +++ b/lib/PublicInbox/InboxWritable.pm @@ -6,6 +6,7 @@ package PublicInbox::InboxWritable; use strict; use v5.10.1; use parent qw(PublicInbox::Inbox PublicInbox::Umask Exporter); +use autodie qw(open); use PublicInbox::Import; use PublicInbox::IO qw(read_all); use PublicInbox::Filter::Base qw(REJECT); @@ -49,8 +50,7 @@ sub _init_v1 { undef $mm; # ->created_at set $sidx->commit_txn_lazy; } else { - open my $fh, '>>', "$self->{inboxdir}/ssoma.lock" or - die "$self->{inboxdir}/ssoma.lock: $!\n"; + open my $fh, '>>', "$self->{inboxdir}/ssoma.lock"; } }