#!/usr/bin/env perl6

use v6.c;

use Acme::Cow;

unit sub MAIN($name);

my $template = Q:to/EOF/;
use Acme::Cow;
unit class Acme::Cow::{$NAME} is Acme::Cow;

my ${$name} = Q:to/EOC/; 

Insert cute ASCII art here

EOC

method new(|c) { callwith( |c, ... ) }  # add overrides or remove
method as_string() { callwith(${$name}) }
EOF

print Acme::Cow.process_template($template, name => $name.lc, NAME => $name.tc);

=begin pod

=head1 NAME

cowpm - Simple boilerplate generator for C<Acme::Cow>-derived classes

=head1 SYNOPSIS

cowpm Name > Name.pm

=head1 DESCRIPTION

Handles most of the tedium detailed in L<Acme::Cow::Example>.
Complains if you don't give it an argument.  Does one module at a time.

=head1 SEE ALSO

L<cowsay>, L<Acme::Cow>, L<Acme::Cow::Example>

=head1 AUTHOR

Elizabeth Mattijsen <liz@wenzperl.nl>

=head1 COPYRIGHT AND LICENSE

Original Perl 5 version: Copyright 2002 Tony McEnroe,
Perl 6 adaptation: Copyright 2019 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

=end pod
