From: Eric Wong Date: Fri, 24 Oct 2025 18:53:56 +0000 (+0000) Subject: spawn: be quiet about missing Inline.pm X-Git-Tag: v2.0.0~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=790834d30b071f95bd12959d88586d19fc90a168;p=thirdparty%2Fpublic-inbox.git spawn: be quiet about missing Inline.pm Inline::C is optional may be dropped entirely future releases, so don't spew confusing warnings to stderr about it being missing. --- diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 7bad71193..9cb486577 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -326,11 +326,13 @@ EOM open STDERR, '>&', $fh; STDERR->autoflush(1); STDOUT->autoflush(1); + my $have_inline; eval { require Inline; + $have_inline = 1; Inline->import(C => $all_libc, BUILD_NOISY => 1); }; - my $err = $@; + my $err = $have_inline ? $@ : ($all_libc = undef); open(STDERR, '>&', $olderr); open(STDOUT, '>&', $oldout); if ($err) {