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

autodie clobbers other modules’ use of %^H #113

Open
FGasper opened this issue Mar 15, 2021 · 2 comments
Open

autodie clobbers other modules’ use of %^H #113

FGasper opened this issue Mar 15, 2021 · 2 comments

Comments

@FGasper
Copy link
Contributor

FGasper commented Mar 15, 2021

https://github.com/FGasper/p5-Sys-Binmode/blob/d0275134fc410f4ebfdfaac9deaeb54b7a69f10e/t/autodie.t

^^ This test fails (TODO notwithstanding) when autodie is loaded and succeeds when it’s not. From my digging it appears that autodie makes it so that $^H{'Sys::Binmode/enabled'} is always false/missing, which of course breaks Sys::Binmode.

@toddr
Copy link
Collaborator

toddr commented Jan 27, 2023

I'm worried that local $^H will break the behavior of autodie. What are your thoughts @FGasper ?

@FGasper
Copy link
Contributor Author

FGasper commented Jan 28, 2023

That’s possible. As I recall, autodie empties $^H, which is because it needs it somehow, but I don’t recall details, alas.

Really, IMO https://github.com/Leont/autocroak should (eventually) replace autodie. The pure-Perl approach relies on some really dark-magic-y Perl hackery, whereas the XS way is pretty straightforward, and it catches things like print and readline, which autodie can’t do.

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

2 participants