diff options
author | Eric Wong <e@80x24.org> | 2023-11-15 04:32:39 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-15 08:02:57 +0000 |
commit | 4bf3fe6a811c6e024af3580f2da15c234fb53011 (patch) | |
tree | 6ba664947cc5cbe2cec26e065dff02071b6c706f /lib/PublicInbox/IO.pm | |
parent | 7d06b126e9395d96a03b37daf49019925ff0ec76 (diff) | |
download | public-inbox-4bf3fe6a811c6e024af3580f2da15c234fb53011.tar.gz |
Avoid mixing autodie use in different scopes since it's likely to cause problems like it did in Gcf2. While none of these fix known problems with test cases, it's likely worthwhile to avoid it anyways to avoid future surprises. For Process::IO, we'll add some additional tests in t/io.t to ensure we don't get unintended exceptions for try_cat.
Diffstat (limited to 'lib/PublicInbox/IO.pm')
-rw-r--r-- | lib/PublicInbox/IO.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/IO.pm b/lib/PublicInbox/IO.pm index 11ce9be1..63ae3ef4 100644 --- a/lib/PublicInbox/IO.pm +++ b/lib/PublicInbox/IO.pm @@ -9,6 +9,8 @@ use PublicInbox::DS qw(awaitpid); our @EXPORT_OK = qw(poll_in read_all try_cat write_file); use Carp qw(croak); use IO::Poll qw(POLLIN); +# don't autodie in top-level for Perl 5.16.3 (and maybe newer versions) +# we have our own ->close, so we scope autodie into each sub sub waitcb { # awaitpid callback my ($pid, $errref, $cb, @args) = @_; |