/usr/lib/x86_64-linux-gnu/perl5/5.24/Data/UUID/LibUUID/DataUUIDCompat.pm is in libdata-uuid-libuuid-perl 0.05-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #!/usr/bin/perl
package Data::UUID::LibUUID::DataUUIDCompat;
use strict;
use warnings;
use Carp ();
use asa 'Data::UUID';
sub import {
my ( $self, @args ) = @_;
if ( @args ) {
Carp::croak("Data::UUID exports only apply to v3 uuids, which are not supported by libuuid");
}
}
sub new { bless {}, shift }
use Data::UUID::LibUUID (
new_dce_uuid_binary => { -as => "create" },
new_dce_uuid_binary => { -as => "create_bin" },
new_dce_uuid_binary => { -as => "create_from_name" },
new_dce_uuid_binary => { -as => "create_from_name_bin" },
new_dce_uuid_string => { -as => "create_str" },
new_dce_uuid_string => { -as => "create_from_name_str" },
);
sub create_b64 { Data::UUID::LibUUID::uuid_to_base64(create()) }
sub create_hex { Data::UUID::LibUUID::uuid_to_hex(create()) }
sub create_from_name_b64 { Data::UUID::LibUUID::uuid_to_base64(create()) }
sub create_from_name_hex { Data::UUID::LibUUID::uuid_to_hex(create()) }
sub from_string { Data::UUID::LibUUID::uuid_to_binary($_[1]) }
sub from_hexstring { Data::UUID::LibUUID::uuid_to_binary($_[1]) }
sub from_b64string { Data::UUID::LibUUID::uuid_to_binary($_[1]) }
sub to_string { Data::UUID::LibUUID::uuid_to_string($_[1]) }
sub to_hexstring { Data::UUID::LibUUID::uuid_to_hex($_[1]) }
sub to_b64string { Data::UUID::LibUUID::uuid_to_base64($_[1]) }
sub compare { Data::UUID::LibUUID::uuid_compare($_[1], $_[2]) }
__PACKAGE__
__END__
=pod
=head1 NAME
Data::UUID::LibUUID::DataUUIDCompat - Drop in L<Data::UUID> replacement
=head1 SYNOPSIS
use Data::UUID::LibUUID::DataUUIDCompat;
my $uuid_gen = Data::UUID::LibUUID::DataUUIDCompat->new; # Data::UUID->new;
my $bin_uuid = $uuid_gen->create;
=head1 DESCRIPTION
See L<Data::UUID> for the API.
Note that this module does not support version 3 UUIDs (namespace based UUIDs),
so C<create_from_name> is faked. The UUID
=cut
|