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 qw( readpipe ) doesn't work as expected. #114

Open
plicease opened this issue May 6, 2021 · 0 comments
Open

autodie qw( readpipe ) doesn't work as expected. #114

plicease opened this issue May 6, 2021 · 0 comments
Labels

Comments

@plicease
Copy link

plicease commented May 6, 2021

Perhaps it is too late to do anything about it, and readpipe isn't mentioned in the autodie man page, but it also doesn't complain about using it with autodie. I would expect it to work like system where if the program doesn't exist ($!) or if the program fails ($?) that it would throw an exception. Instead it seems to throw an exception when the output of the program is false.

✅ doublethink% perl -E 'use autodie qw( readpipe ); `true`'
Can't readpipe('true'):  at -e line 1
❌ doublethink% perl -E 'use autodie qw( readpipe ); `false`'
Can't readpipe('false'):  at -e line 1
❌ doublethink% perl -E 'use autodie qw( readpipe ); `echo "hi"`'
❌ doublethink% perl -E 'use autodie qw( readpipe ); `echo -n "0"`'
Can't readpipe('echo -n "0"'):  at -e line 1
@toddr toddr added the Needs PR label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants