Skip to content

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

@plicease

Description

@plicease

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions