blib/lib/Catmandu/IdGenerator/UUID.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Catmandu/Fix/filter.pm ↑ Summary blib/lib/Catmandu/Exporter/YAML.pm »
1 package Catmandu::IdGenerator::UUID;
2  
3 15 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 15 our $VERSION = '1.0201_02';
6  
7 15 ▶use Data::UUID;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 15 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 15 with 'Catmandu::IdGenerator';
12  
13 15 has _uuid => (is => 'lazy', builder => '_build_uuid');
14  
15 2 ▶sub _build_uuid {Data::UUID->new}
Subroutine _build_uuid: called CC=1 SCAR=0.0
16  
17 sub generate {
18 7 ▶ $_[0]->_uuid->create_str;
Subroutine generate: called CC=1 SCAR=0.0
Pod undocumented
19 }
20  
21 15 1;
22  
23 __END__
24  
25 =pod
26  
27 =head1 NAME
28  
29 Catmandu::IdGenerator::Mock - Generator of UUID identifiers
30  
31 =head1 SYNOPSIS
32  
33 use Catmandu::IdGenerator::UUID;
34  
35 my $x = Catmandu::IdGenerator::Mock->new;
36  
37 for (1..100) {
38 printf "id: %s\n" m $x->generate;
39 }
40  
41 =head1 DESCRIPTION
42  
43 This L<Catmandu::IdGenerator> generates identifiers based on the Universally
44 Unique Identifier (UUID) standard. A UUID is a 128 bit number represented by
45 lowercase hexadecimal digits such as C<de305d54-75b4-431b-adb2-eb6b9e546014>.
46  
47 =cut
« blib/lib/Catmandu/Fix/filter.pm ↑ Summary blib/lib/Catmandu/Exporter/YAML.pm »