]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
inbox_writable: use autodie::open
authorEric Wong <e@80x24.org>
Sat, 18 Jan 2025 01:26:03 +0000 (01:26 +0000)
committerEric Wong <e@80x24.org>
Tue, 21 Jan 2025 22:36:54 +0000 (22:36 +0000)
autodie should give us more consistent error reporting going
forward.

lib/PublicInbox/InboxWritable.pm

index 18412cc3f132e9a26da5d44b1e56f83d4350c0e6..f391d7ee2f430b93e5c5f2764ae873c8e699107a 100644 (file)
@@ -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";
        }
 }