File-Temp reviews

cpanratings
 

RSS | Module Info | Add a review of File-Temp

File-Temp (0.2301) ****

My only complaint is that File::Temp does not allow you to specify the permission bits with an option like PERMISSION => 0x666 for example. You have to do it yourself with a separate call to chmod.

Larry Siden - 2013-05-08T04:48:22 (permalink)

0 out of 1 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.22) *****

Very useful module. It works just as what I need. Good job.

Cheng Zhang - 2011-01-17T23:09:03 (permalink)

1 out of 1 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.22) *****

Nice and useful module for creating and cleaning up temporary files, safely. It provides an interface to return the filename, the filehandle, or both together. Why reinvent the wheel with your own temp file names created from $$ or whatever? Just use File::Temp!

Timur Shtatland - 2010-05-27T14:58:24 (permalink)

5 out of 5 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.16) ****

I have used File::Temp extensively in the test suites of my CPAN modules ExtUtils::ModuleMaker and ExtUtils::ModuleMaker::PBP and will use it directly in a module to come, File::Save::Home. I strongly advocate its use in any situation where you are testing code for the creation of files and directories. All such tests should take place in a temporary directory functioning as a sandbox, and that temporary directory and its contents should be removed when the test has been completed.

My only quibble with File::Temp is that, having used the object-oriented interface and gotten accustomed to having my tempfiles be deleted when the object goes out of scope, I long for the same facility with respect to tempdirs. As of v0.16, 'tempdir' is available only through the functional interface and you must explicitly call CLEANUP => 1 to get the tempdirs so created deleted at the end of the *program*. I would love to have a function/method that automatically deletes tempdirs at the end of their *enclosing scope/block*. This would, for example, enable me to create a tempdir within a block, test for its existence, have the tempdir deleted automatically when the block is closed, then test again for its non-existence.

This wish aside, kudos to Tim Jenness for both writing File::Temp and, even more importantly, maintaining it over the years.

James E Keenan - 2005-11-12T10:44:56 (permalink)

8 out of 8 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.16) ****

I'll say up front that one of two of the interface decisions in File::Temp bug me. Some things are given confusingly-similar names, and then there's CLEANUP => 1. In the end, though, these minor quibbles are overshadowed by the incredible usefulness of self-destroying files and directories. My test scripts abound with File::Temp use; make a directory, go hog wild making files in it, and when you're done it goes away. Dump logs into tmpfiles for analysis. Later on they're gone. Totally freaking awesome.

Ricardo Signes - 2005-11-04T18:36:50 (permalink)

7 out of 7 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.15) ****

A great module for regular use - if you need to save a temporary file, use File::Temp. It saves a lot of time and effort, and tries to make sure the temporary file is as safe as possible.

binaryape - 2005-02-22T13:27:09 (permalink)

4 out of 5 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.16) ****

File::Temp is temporary file handling done right. It takes care of all the annoying bits that make dealing with temporary files a hassle. In particular, I find temporary files indispensable for atomic writing to data files that might be opened by other (less careful) processes.

The interface of File::Temp is a bit odd. KEY => value pairs in all caps don't feel natural to me and a couple of for historic reasons differently named functions doing basically the same thing aren't at the height of interfaces in my opinion.

I would be able to do the temporary file handling without the module pretty well, but it would cost me significantly more thought. But just a few years ago, I mightn't have known about all the weird things that can happen to a simple-minded approach. So: (File::Temp)++

Steffen Müller - 2004-07-14T04:17:17 (permalink)

4 out of 4 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.14) *****

This module seems to do what it claims: create temporary directories and files and clean them up when the program is done, without having to do any book-keeping.

It's very easy to use.

Robert Rothenberg - 2004-07-13T09:07:14 (permalink)

2 out of 2 found this review helpful. Was this review helpful to you?  Yes No

File-Temp (0.14) ****

Nice and easy to use. I love the fact that it supports any implementation and any programming style you might fancy. Only drawback is that the docs look a bit "scary" at first contact. Maybe include more basic examples at the top like:

($fh, $filename)=tempfile();

With no parameters. Simple. Vanilla. No Sprinkles, whipped cream or chocolate syrup.

issac - 2004-01-27T13:37:27 (permalink)

8 out of 8 found this review helpful. Was this review helpful to you?  Yes No