Add option to choose between read-write and write-only mode [rt.cpan.org #99444]
xdg opened this issue · comments
David Golden commented
https://rt.cpan.org/Ticket/Display.html?id=99444
File::Temp currently opens temporary files with O_RDWR. This makes it impossible to use it with PerlIO::gzip (i.e. set binmode gzip) because the latter only works with read-only or write-only file descriptors. Therefore it would be very useful to have an option to set write-only mode. I don't think that read-only would make much sense because then you could only read from an empty file.
Leon Timmermans commented
Sounds reasonable to me, having some way to pass the mode would be useful.