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

When autodie is in scope, bogus warning is emitted on open for output after STDIN closed #108

Open
subrook opened this issue Jul 22, 2020 · 1 comment

Comments

@subrook
Copy link

subrook commented Jul 22, 2020

$ ls foo
ls: cannot access 'foo': No such file or directory
$ perl -e "use autodie ':io'; close (STDIN); open (FILE, '> foo');"
Filehandle STDIN reopened as FILE only for output at (eval 8) line 89.
$ ls foo
foo
$ 

The open() call clearly succeeds, since the file is created. And the warning emitted doesn't make any sense: there is no attempt to reopen STDIN or any other input stream. (The line number in the warning is also absurd for a one-line script.)

@toddr
Copy link
Collaborator

toddr commented Jan 27, 2023

Confirmed behavior on perl 5.36 with latest autodie.

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

2 participants