Catmandu::IdGenerator(3pm) | User Contributed Perl Documentation | Catmandu::IdGenerator(3pm) |
Catmandu::IdGenerator - A base role for identifier generators
package MyGenerator; use Moo; with 'Catmandu::IdGenerator'; sub generate { my ($self) = @_; return int(rand(999999)) . "-" . time; } package main; my $gen = MyGenerator->new; for (1..100) { printf "id: %s\n" m $gen->generate; }
Catmandu::IdGenerator::Mock , Catmandu::IdGenerator::UUID
2023-03-03 | perl v5.36.0 |