perlpilot / p6-File-Temp

Simple implementation of File::Temp for creating temporary files
9 stars 16 forks source link

Address issue #11 (for files, but not directories) #14

Closed skids closed 8 years ago

skids commented 8 years ago

Allows files to be deleted when file handles are garbage collected, in addition to during END. Note that this means we no can longer ensure .close is called before deletion since we cannot hold onto the handle or it will never get collected. If that is important it can be made an option at the cost of potential leakiness.

Since directories do not produce a handle to discard, they will still accrue. Adding a form of tempdir() that returns an open dirhandle would allow the same treatment.