logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catmandu::IdGenerator - A base role for identifier generators

Name

       Catmandu::IdGenerator - A base role for identifier generators

See Also

       Catmandu::IdGenerator::Mock , Catmandu::IdGenerator::UUID

perl v5.40.0                                       2025-01-17                         Catmandu::IdGenerator(3pm)

Synopsis

           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;
           }

See Also