[rt-devel] Date in Unix format

David N. Blank-Edelman dnb at ccs.neu.edu
Wed Sep 27 13:46:50 EDT 2000


arclight at jump.net writes:

> Aside: I also like POSIX::tmpnam() vs some unholy amalgam of $$ and
> time() if only because I can blame a standards committee (or Sun) if
> my code blows up...

To go further afield, this method (or using IO::File->new_tmpfile()
which is another interface to the same thing) is better because it, in
theory, produces non-predictable filenames. This is pretty crucial for
security purposes. The "in theory" part is in my statement because not
all operating systems produce good random names.  For example, SunOS
4.x has a lousy implementation of tmpfile.

If you want to be even spiffier in this regard, later version of Perl
(the 5.7.0 track) will be shipping with File::Temp which attempts to
do the "right thing" even when the operating system does not.

For more information on File::Temp and temporary files, see:

http://search.cpan.org/search?mode=module&query=File%3A%3ATemp

Hope this diversion is helpful to the RT developers and other folks.
   Peace,
      dNb 




More information about the Rt-devel mailing list