in reply to What's the best way to avoid name collisions when creating files?

How about Data::UUID? It was featured for the 10th day of last year's Perl Advent Calendar: http://perladvent.org/2004/10th.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on Re: What's the best way to avoid name collisions when creating files?

Replies are listed 'Best First'.
Re^2: What's the best way to avoid name collisions when creating files?
by adamk (Chaplain) on May 03, 2005 at 12:02 UTC
    I concur. :)

    You want a truly unique idenfier? "Universally Unique Identifier" pretty much describes it.
      Although Data::UUID looks like an interesting solution, one big annoyance for me is it doesn't come standard in my Perl distribution (Fedora Core 1).
        Unfortunately, RedHat is not the most pregressive distribution in the world. In fact, _most_ distributions contain only a pitiful amount of the CPAN modules that exist.

        There are 8000 CPAN packages. That is more than some distributions.

        PAUSE see updates for up to 50 packages a day. That is more than some distributions.

        Because of the sheer volume of packages, CPAN is to some degree a victim of it's own success. If a module isn't used by an application that has 100,000 users, its unlikely to end up being packaged simply because it would be unrealistic for distros to do them all. They'd simply swamp the package management system.

        In fact, I'd go so far as to say you arn't a "real" Perl programmer until you exceed the boundaries of the modules that are available on most distros.
        $ perl -MCPAN -e 'install Data::UUID'
        should do the trick. Don't be stupid and refuse to use the 7000+ distributions that don't come standard with Perl.

        The Perfect is the Enemy of the Good.