perlpilot / p6-File-Temp

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

Throw exception if File::Temp can't create temporary file #12

Closed tokuhirom closed 8 years ago

tokuhirom commented 8 years ago

Current implementation returns empty list if File::Temp can't create temporary file. https://github.com/perlpilot/p6-File-Temp/blob/master/lib/File/Temp.pm#L32

But it cause a programming issue in user's code. I recommend to throw exception if it can't create temporary file.

rudis commented 8 years ago

Seconded. Removes useless checks in all programs. Please raise an exception.

perlpilot commented 8 years ago

As of 00daa46ff2330baa5dae1319e85399e65a546435 it now fails when it can't create a file/dir.