Acme-DreamyImage
view release on metacpan or search on metacpan
lib/Acme/DreamyImage.pm view on Meta::CPAN
our $VERSION = '2.0';
use Object::Tiny qw(seed width height);
use self;
use Imager qw(:handy);
use Digest::SHA1 qw(sha1_hex);
sub new {
$self = $self->SUPER::new(@args);
die "'seed' is required\n" unless defined $self->{seed};
die "'width' is required, and cannot be 0.\n" unless defined $self->{width} && $self->{width} > 0;
die "'height' is required, and cannot be 0.\n" unless defined $self->{height} && $self->{height} > 0;
$self->{seed} = sha1_hex($self->seed);
return $self;
}
sub write {
my $image = $self->random_image;
$image->write(@args) or die $image->errstr;
return $self;
}
xt/03_pod.t view on Meta::CPAN
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();
( run in 0.934 second using v1.01-cache-2.11-cpan-0a6323c29d9 )