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

File::Temp::tempfile() in scalar context should create an unlinked file. #173

Closed
FGasper opened this issue Mar 7, 2022 · 0 comments · Fixed by #174
Closed

File::Temp::tempfile() in scalar context should create an unlinked file. #173

FGasper opened this issue Mar 7, 2022 · 0 comments · Fixed by #174

Comments

@FGasper
Copy link
Contributor

FGasper commented Mar 7, 2022

> perl -MFile::Temp -E'my $fh = File::Temp::tempfile(); say for (stat $fh)[3]'
0

… but:

> perl -MFile::Temp -E'use Test::MockFile plugin => "FileTemp"; my $fh = File::Temp::tempfile(); say for (stat $fh)[3]'
1

This breaks at least one internal test.

atoomic added a commit to atoomic/Test-MockFile that referenced this issue Mar 7, 2022
Fix cpanel#173:

Make sure we respect the call of File::Temp::tempfile
in scalar context and create an unlinked file.
atoomic added a commit to atoomic/Test-MockFile that referenced this issue Mar 7, 2022
Fix cpanel#173:

Make sure we respect the call of File::Temp::tempfile
in scalar context and create an unlinked file.
@toddr toddr closed this as completed in #174 Mar 7, 2022
toddr pushed a commit that referenced this issue Mar 7, 2022
Fix #173:

Make sure we respect the call of File::Temp::tempfile
in scalar context and create an unlinked file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant