Subject: | index/contents not available in generated HTML |
I reported https://rt.cpan.org/Ticket/Display.html?id=52324 "since
upgrade index not created" and the fix was applied the in 3.11.
Everything was going fine until I'd switched to a perlbrew with Perl
5.14 and got Pod::Simple::HTMLBatch 3.19 and my index/contents
disappeared again. After having checked that rt52324 had not come back I
discovered my generated HTML contains css references like this:
<html><head><title>BET::Service::User</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
Show quoted text
>
<link rel="stylesheet" title="blkbluw" type="text/css"
href="../../_blkbluw.css" media="all" >
<link rel="alternate stylesheet" title="blkmagw" type="text/css"
href="../../_blkmagw.css" media="all" >
but stylesheet blkbluw.css contains:
/* This file is autogenerated. Do not edit. blkbluw */
@import url("./_blkbluw.css");
.indexgroup { display: none; }
so I get no index/contents. It appears something has gone wrong with the
variations since 3.15 (worked in 3.14). The following code around line
700ish:
# Now a few indexless variations:
foreach my $variation (
'blkbluw', # black_with_blue_on_white
'whtpurk', # white_with_purple_on_black
'whtgrng', # white_with_green_on_grey
'grygrnw', # grey_with_green_on_white
) {
my $outname = $variation;
my $this_css = join "\n",
"/* This file is autogenerated. Do not edit. $outname */\n",
"\@import url(\"./_$variation.css\");",
".indexgroup { display: none; }",
"\n",
;
my $name = $outname;
$name =~ tr/-_/ /;
# MJE remove the _ in the filename below to get the avoid
overwriting indexed css:
$self->add_css( "_$outname.css", 0, $name, 0, 0, \$this_css);
}
seems to be ovewriting the blkbluw css which has the index turned on
with a variation file with the index turned off. I'd guess it was the
name change mentioned in the Changes file in 3.15. I made it work again
using a total hack by removing the leading _ in the variations above but
I doubt that is the proper fix.
I would have supplied a patch but I don't know exactly what the code is
supposed to do. I assumed one css has the index turned on and other
variations have it turned off but to fix the issue the variations need
different names and in the case of the default style the variation has
the same name and overwrites the default one.
I can of course supply any further details you need.
Martin
--
Martin J. Evans
Wetherby, UK