line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::urn::uuid; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
9933
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
109
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
11
|
use base qw(URI::urn); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
2086
|
|
7
|
2
|
|
|
2
|
|
23888
|
use Data::UUID; |
|
2
|
|
|
|
|
1788
|
|
|
2
|
|
|
|
|
407
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub uuid { |
10
|
6
|
|
|
6
|
1
|
98
|
my $self = shift; |
11
|
6
|
|
|
|
|
35
|
my $nss = $self->nss(@_); |
12
|
|
|
|
|
|
|
|
13
|
6
|
|
|
|
|
1156
|
my $ug = Data::UUID->new; |
14
|
6
|
100
|
|
|
|
14
|
my $uuid = eval { $ug->from_string($nss) } or return; |
|
6
|
|
|
|
|
1770
|
|
15
|
4
|
|
|
|
|
626
|
return lc $ug->to_string($uuid); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub uuid_binary { |
19
|
2
|
|
|
2
|
1
|
3
|
my $self = shift; |
20
|
2
|
|
|
|
|
221
|
my $ug = Data::UUID->new; |
21
|
2
|
|
100
|
|
|
5
|
return eval { $ug->from_string($self->nss) } || undef; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |