use strict;
use Pod::HtmlEasy;
use File::Spec;
use File::Path;
use File::Slurp;
my $podhtml = Pod::HtmlEasy->new() ;
########################################################################
my $css; # defined at end of file
write_file( 'htmldoc/style.css', $css ) unless ( -f 'htmldoc/style.css' );
########################################################################
foreach my $file (@ARGV) {
-f $file or next;
my $html_file = $file;
$html_file =~ s{\.(pm|pod)$}{\.html} or next;
$html_file =~ s{blib/lib/|^}{htmldoc/};
if ( -f $html_file and -M $html_file < -M $file ) {
print "Skip $file (unchanged)\n";
next;
}
print "HTMLifying $html_file\n";
my $content = $podhtml->pod2html( $file ) or next;
my @levels = $html_file =~ m{/}g;
my $rel_style = ( '../' x $#levels ) . "style.css";
$content =~ s{}{}s;
$content =~ s{\Q*\E\n(\Q