On Thu, Jun 16, 2011 at 09:23:50PM +0100, Robert Rothenberg wrote:
> While debugging a project that generated a lot of temporary files, I came
> upon a nifty idea: rather than name the temporary files the usual random
> strings, why not have the files named by the method/function that created
> them, e.g. instead of something like /tmp/Hf6254d85.txt, why not call it
> /tmp/Some_Package_Name/text_analysing_function-Hf6254d85.txt.
> 
> Anyhow, I think this might be something worth uploading to CPAN.
> 
> So what should it be called?
> 
> I was thinking of something like File::Temp::Smart, for lack of a better
> name. But I am open to better ideas.

Rather than yet another module which has functionality very similar to
other stuff that's already on the CPAN, have you considered submitting a
patch to the author of File::Temp?  A good place to make the change,
without changing the existing API, would be to make the 'template'
argument, in all the places it appears, support sprintf-a-like
%sequences - eg %f for the function name, %p for the package, %d for
the ISO standard date, %t for datetime etc.

-- 
David Cantrell | Cake Smuggler Extraordinaire

In this episode, R2 and Luke weld the doors shut on their X-Wing,
and Chewbacca discovers that his Ewok girlfriend is really just a
Womble with its nose chopped off.

Reply via email to