line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Catmandu::Sane; |
5
|
1
|
|
|
1
|
|
92566
|
use Data::UUID::MT; |
|
1
|
|
|
|
|
165773
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
791
|
use Moo; |
|
1
|
|
|
|
|
63031
|
|
|
1
|
|
|
|
|
40
|
|
7
|
1
|
|
|
1
|
|
8
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
847
|
|
|
1
|
|
|
|
|
947
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Fix::Base'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self, $fixer) = @_; |
14
|
|
|
|
|
|
|
my $path = $fixer->split_path($self->path); |
15
|
3
|
|
|
3
|
0
|
17259
|
|
16
|
3
|
|
|
|
|
19
|
$fixer->emit_create_path( |
17
|
|
|
|
|
|
|
$fixer->var, |
18
|
|
|
|
|
|
|
$path, |
19
|
|
|
|
|
|
|
sub { |
20
|
|
|
|
|
|
|
my $var = shift; |
21
|
|
|
|
|
|
|
"${var} = Data::UUID::MT->new(version => 4)->create_string;"; |
22
|
3
|
|
|
3
|
|
263
|
} |
23
|
3
|
|
|
|
|
12
|
); |
24
|
|
|
|
|
|
|
} |
25
|
3
|
|
|
|
|
142
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Catmandu::Fix::uuid - create a Globally/Universally Unique Identifier |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SYNOPSIS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
uuid(my.field) # my => {field => '4162F712-1DD2-11B2-B17E-C09EFE1DC403' } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SEE ALSO |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
L<Catmandu::Fix> |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |