App-Basis
view release on metacpan or search on metacpan
bin/appbasis view on Meta::CPAN
my $shortname = path( $appname)->basename ;
$boilerplate =~ s/%%APPNAME%%/$shortname/gsm;
# remove the leading '|' that is used to keep the boilerplate doc header away
# from the pod for this app
$boilerplate =~ s/^\|//gsm ;
path($appname)->spew($boilerplate);
if ( -f $appname ) {
# being lazy, not reading in the current value and updating and writing back
system("chmod a+x '$appname'");
print "app $appname created.\n";
}
else {
print "failed to create $appname\n";
exit 1;
}
exit 0;
# this is the boilerplate
( run in 0.464 second using v1.01-cache-2.11-cpan-496ff517765 )