App-Cmd
view release on metacpan or search on metacpan
eg/lib/Palette/Command/paint.pm view on Meta::CPAN
=head1 DESCRIPTION
Paint a target file using a chosen color and image format.
=cut
sub opt_spec {
return (
[ 'color=s', 'color to paint with', { completion => 'fn:colors' } ],
[ 'format=s', 'output image format', { completion => [qw(png jpg svg pdf)] } ],
[ 'output=s', 'destination file', { completion => 'files' } ],
[ 'verbose|v', 'show progress' ],
);
}
sub execute {
my ($self, $opt, $args) = @_;
my $color = $opt->color // '(none)';
my $format = $opt->format // '(none)';
( run in 3.157 seconds using v1.01-cache-2.11-cpan-df04353d9ac )