Re: [Module::Build] any pod2html action?
Status: Beta
Brought to you by:
kwilliams
|
From: Randy K. <ra...@th...> - 2004-01-15 18:41:13
|
On Thu, 15 Jan 2004, Uri Guttman wrote:
>
> gack! i am glad i didn't attempt to write that. which
> version of build will that appear in? i may write my own
> because i use the files from the MANIFEST to find stuff
> but will i need to do all that stuff? i have that nice
> grep_manifest method i use for other stuff as well. i
> assume knowing the possible podded files will simplify
> much of the logic.
Originally I had also used MANIFEST to get a list of pod
files, but then an extra layer of logic had to be added to
figure out where to put the html files under the blib/ tree
(eg, Foo::Bar -> blib/html/site/lib/Foo/Bar.html, no matter
if Bar.pm is in the package's top-level directory, or under
lib/Foo/, or even somewhere else). The 'build' target
already figures the directory structure out, so I just used
that.
> i do have some minor code comments:
>
> >>>>> "RK" == Randy Kobes <ra...@th...> writes:
>
> RK> + my $backlink = '__top';
> RK> + my $css = ($^O =~ /Win32/) ? 'Active.css' : '';
> RK> + foreach my $pod (keys %pods){
> RK> + my @dirs = split /::/, $pods{$pod};
> RK> + my $isbin = shift @dirs eq 'script';
>
> i keep perl executables in a bin/ dir. shouldn't that be supported? also
> what about other dirs such as utils/ (which has scripts only for using in
> this tarball but may have pod as well)
That's a good point - those could be added.
> and why a destructibve shift instead of an index? (i know shift is
> slightly faster but index is probably clearer).
>
> my $isbin = $dirs[0] eq 'script';
>
> RK> + my $infile = File::Spec::Unix->abs2rel($pod);
> RK> + my $outfile = (pop @dirs) . '.html';
>
> same here:
>
> my $outfile = "$dirs[-1].html";
That would be clearer - thanks.
--
best regards,
randy
|