Catmandu/Fix/uuid.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.4% 27 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catmandu/Fix/uri_status_code.pm ↑ Summary
1 package Catmandu::Fix::uuid;
2  
3 1 our $VERSION = '0.15';
4  
5 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Data::UUID::MT;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 with 'Catmandu::Fix::Base';
11  
12 1 has path => (fix_arg => 1);
13  
14 3 ▶sub emit {
Subroutine emit: called CC=1 SCAR=0.0
Pod undocumented
15 3 my ($self, $fixer) = @_;
16 3 my $path = $fixer->split_path($self->path);
17  
18 $fixer->emit_create_path(
19 $fixer->var,
20 $path,
21 3 ▶ sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
22 3 my $var = shift;
23 3 "${var} = Data::UUID::MT->new(version => 4)->create_string;";
24 }
25 3 );
26 }
27  
28 =head1 NAME
29  
30 Catmandu::Fix::uuid - create a Globally/Universally Unique Identifier
31  
32 =head1 SYNOPSIS
33  
34 uuid(my.field) # my => {field => '4162F712-1DD2-11B2-B17E-C09EFE1DC403' }
35  
36 =head1 SEE ALSO
37  
38 L<Catmandu::Fix>
39  
40 =cut
41  
42 1 1;
« Catmandu/Fix/uri_status_code.pm ↑ Summary