Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect documentation note for $Archive::Tar::WARN #41

Open
drgrice1 opened this issue Sep 3, 2023 · 0 comments
Open

Incorrect documentation note for $Archive::Tar::WARN #41

drgrice1 opened this issue Sep 3, 2023 · 0 comments

Comments

@drgrice1
Copy link

drgrice1 commented Sep 3, 2023

The documentation on $Archive::Tar::WARN states that setting this variable to 0 is not threadsafe. That is not really accurate. It is threadsafe to set that variable to 0 as doing so only turns of a carp call. What is not threadsafe is to set this variable to 0, and then use the $Archive::Tar::error variable. However, it is threadsafe to set $Archive::Tar::WARN to 0 and use the $tar->error method to obtain error messages.

I know this is just quibbling on details, but if you want to catch warnings in a threadsafe manner, and don't want warnings handled by the current $SIG{__WARN__} handler, then setting this variable to 0 and using $tar->error is a threadsafe way to do so, and the documentation is misleading on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant