lzap/cpan-uuid — pull request #1 by snakpak (2014-12-14 22:43:15+00:00)
Title: Added uuid()

This repository is out of sync with CPAN, but I'll submit here anyway since the only conflict is in the Changes file.

This patch fulfills a common use case and benchmarks ~15% faster in that use.

Instead of:

use UUID ':all';
sub my_uuid {
my ( $uuid, $str );
generate( $uuid );
unparse( $uuid, $str );
return $str;
}
my $uuid_str = my_uuid();

Replace with:

use UUID 'uuid';
my $uuid_str = uuid();