1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
BEGIN {
use File::Spec;
if ( File::Spec->isa("File::Spec::Unix") ) {
plan 'no_plan';
} else {
plan skip_all => "not running on something UNIXish";
}
}
use ok 'Data::UUID::LibUUID' => ":all";
for ( 1 .. 2 ) {
my @uuids;
foreach my $child ( 1 .. 3 ) {
my $pid = open my $handle, "-|";
die $! unless defined $pid;
if ( $pid ) {
push @uuids, <$handle>;
close $handle;
} else {
print new_uuid_string();
exit;
}
}
push @uuids, new_uuid_string();
while ( @uuids ) {
my $str = shift @uuids;
isnt( $str, $_ ) for @uuids;
}
}
|