Catmandu::IdGenerator - A base class for modules that needs to generate identifiers
package MyPackage; use Moo; with 'Catmandu::IdGenerator'; sub generate { return int(rand(999999)) . "-" . time; } package main; my $x = MyPackage->new; for (1..100) { printf "id: %s\n" m $x->generate; }
Catmandu::IdGenerator::Mock , Catmandu::IdGenerator::UUID
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.