perl.autodoc.script.mustache Maven / Gradle / Ivy
#!/usr/bin/perl
use FindBin;
use File::Spec;
use lib File::Spec->catdir($FindBin::Bin, '..', 'lib');
use Moose::Util qw(apply_all_roles);
use Getopt::Std;
my %options=();
getopts("wnphmHc:", \%options);
help if $options{h};
my $my_app = $options{c} || 'My::App';
if ($options{c}) {
eval <new;
if ($options{H}) {
my $pod2html = "pod2html --backlink --css http://st.pimg.net/tucs/style.css?3";
open STDOUT, "| $pod2html" or die "Can't fork: $!";
$api->autodoc($opt);
close STDOUT or die "Can't close: $!";
}
elsif ($options{m}) {
my $pod2markdown = "pod2markdown --html-encode-chars 1";
open STDOUT, "| $pod2markdown" or die "Can't fork: $!";
$api->autodoc($opt);
close STDOUT or die "Can't close: $!";
}
else {
$api->autodoc($opt);
}
exit(0);
# --------------------
sub help {
print <