about summary refs log tree commit homepage
path: root/lib/PublicInbox/XapHelperCxx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-17 23:37:53 +0000
committerEric Wong <e@80x24.org>2023-10-18 20:50:25 +0000
commitde88c4a4443eae433f17c717af26c987cdbcaac4 (patch)
tree25febc972bf4e96cf6d17b4f9e94aa947872efd7 /lib/PublicInbox/XapHelperCxx.pm
parent19b791f4894efcb6e545a6b51c8147298363358f (diff)
downloadpublic-inbox-de88c4a4443eae433f17c717af26c987cdbcaac4.tar.gz
This ought to lower the cognitive overhead of reading our code.
Diffstat (limited to 'lib/PublicInbox/XapHelperCxx.pm')
-rw-r--r--lib/PublicInbox/XapHelperCxx.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm
index 83015379..bd616b6f 100644
--- a/lib/PublicInbox/XapHelperCxx.pm
+++ b/lib/PublicInbox/XapHelperCxx.pm
@@ -29,12 +29,13 @@ my $xflags = ($ENV{CXXFLAGS} // '-Wall -ggdb3 -O0') . ' ' .
 my $xap_modversion;
 
 sub xap_cfg (@) {
-        open my $err, '+>', undef or die "open(undef): $!";
+        use autodie qw(open seek);
+        open my $err, '+>', undef;
         my $cmd = [ $ENV{PKG_CONFIG} // 'pkg-config', @_, 'xapian-core' ];
         my $rd = popen_rd($cmd, undef, { 2 => $err });
         chomp(my $ret = do { local $/; <$rd> });
         return $ret if close($rd);
-        seek($err, 0, SEEK_SET) or die "seek: $!";
+        seek($err, 0, SEEK_SET);
         $err = read_all($err);
         die <<EOM;
 @$cmd failed: Xapian development files missing? (\$?=$?)