Art::World::Util - Generating all kind of data for the Art::World
use Art::World::Util; say Art::World::Util->new_person->fake_name; #==> Firtname Lastname say Art::World::Util->new_math->pick( 10, 1000 )); #==> 666
Art::World::Util provide useful generation tools for automated Agents creation, data manipulation and other utilities that are not strictly related to the Art::World entities.
Art::World::Util
Agents
Artists usually don't like maths too much.
Pick an integer between a range that can be passed as a parameter. Mostly a way to not have to memorize $min + int ( rand ( $max - $min )).
$min + int ( rand ( $max - $min ))
Looks like the Art::World::Meta toolkit. See https://metacpan.org/pod/Class::MOP::Class for extreme cases.
my $meta = $self->meta;
Also there is the Zydeco's $class object.
$class
This is a couple of utilities that makes a sort of meta-programming very simple. It is more like a reminder for my bad memory than something very interesting. Largely inspired by this Perl Monks thread.
Art::World::Meta->get_all_attributes( $artist ); # ==> ( 'id', 'name', 'reputation', 'artworks', 'collectors', 'collected', 'status' )
Mostly useless since Zydeco rely on Moo(se) so the Moose Meta Object Protocol is available.
Returns the class of the object.
Returns only attributes that are set for a particular object.
Returns even non-set attributes for a particular object.
Generate a complete person name using Faker.
Handy way for generating a Time::Moment object that can be used for Events for example.
Events
my $t = Art::World::Util->new_time( source => '2020-02-16T08:18:43' );
Sébastien Feugère <sebastien@feugere.net>
Copyright 2006-2021 Sebastien Feugère
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
To install Art::World, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Art::World
CPAN shell
perl -MCPAN -e shell install Art::World
For more information on module installation, please visit the detailed CPAN module installation guide.