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 does not trap errors in <> operator [rt.cpan.org #74606] #99

Open
toddr opened this issue Jan 16, 2020 · 0 comments
Open

autodie does not trap errors in <> operator [rt.cpan.org #74606] #99

toddr opened this issue Jan 16, 2020 · 0 comments

Comments

@toddr
Copy link
Collaborator

toddr commented Jan 16, 2020

Migrated from rt.cpan.org#74606 (status was 'open')

Requestors:

From [email protected] on 2012-02-02 00:05:50
:

autodie does not catch errors in the implicit open done by the <> operator.

# perl -e 'use autodie qw(open); <>; print("did not autodie!\n");' foo

Can't open foo: No such file or directory at -e line 1.
did not autodie!

An explicit open with an error is caught.

# perl -e 'use autodie qw(open); open(FH, "foo"); print("did not autodie!\n");'
Can't open 'foo' for reading: 'No such file or directory' at -e line 1

Ubuntu 10.10,  perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi, 2.6.35-32-server #64-Ubuntu SMP Tue Jan 3 02:11:24 UTC 2012 x86_64 GNU/Linux, perl-modules 5.10.1-12ubuntu2.1


From [email protected] on 2020-01-08 07:12:26
:

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

No branches or pull requests

1 participant