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 should die when stat/lstat fails [rt.cpan.org #60251] #91

Open
toddr opened this issue Jan 16, 2020 · 1 comment
Open

autodie should die when stat/lstat fails [rt.cpan.org #60251] #91

toddr opened this issue Jan 16, 2020 · 1 comment

Comments

@toddr
Copy link
Collaborator

toddr commented Jan 16, 2020

Migrated from rt.cpan.org#60251 (status was 'new')

Requestors:

From [email protected] on 2010-08-11 16:58:25
:

$ perl -Mautodie -E 'stat("/foobar"); say $!; say "alive"'
No such file or directory
alive

IMHO, autodie should die here too.

In fact, at least every function in perlfunc that can set $! should be
wrapped by autodie.

Regards,
Danijel

@toddr
Copy link
Collaborator Author

toddr commented Dec 28, 2023

People often use stat to look for the presence of a file. I don't think this is doable without breaking a lot of existing code.

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