diff options
author | Marc Green <marcgreen@cpan.org> | 2011-06-23 08:50:37 -0400 |
---|---|---|
committer | Marc Green <marcgreen@cpan.org> | 2011-10-31 13:26:41 -0400 |
commit | f360b455d78a650d8df53a90267a8b249797c655 (patch) | |
tree | 315e43bae5977b0a693f4393e23d8fee4d7a7d80 /ext/Pod-Html/lib | |
parent | 5119e4ae9c008c1a4c9b4337073e9fa5ac3f8707 (diff) | |
download | perl-f360b455d78a650d8df53a90267a8b249797c655.tar.gz |
Fix --backlink bug; add some documentation
The bug prevented '<body id="_podtop_">' from appearing when
--backlink was enabled
Diffstat (limited to 'ext/Pod-Html/lib')
-rw-r--r-- | ext/Pod-Html/lib/Pod/Html.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm index 11a9ed71d0..3d78b6dbe4 100644 --- a/ext/Pod-Html/lib/Pod/Html.pm +++ b/ext/Pod-Html/lib/Pod/Html.pm @@ -127,7 +127,8 @@ HTML converted forms can be linked to in cross references. --podroot=name Specify the base directory for finding library pods. This is prepended -to each directory in podpath before searching for PODs. +to each directory in podpath before searching for PODs. Default is the +current working directory. =item quiet @@ -273,19 +274,24 @@ sub pod2html { # set options for the parser my $parser = Pod::Simple::XHTML::LocalPodLinks->new(); - $parser->pages(\%Pages); - $parser->backlink($Backlink); + $parser->backlink($Backlink); # linkify =head1 directives $parser->htmldir($Htmldir); $parser->htmlfileurl($Htmlfileurl); $parser->htmlroot($Htmlroot); $parser->index($Doindex); $parser->output_string(\my $output); # written to file later + $parser->pages(\%Pages); $parser->quiet($Quiet); $parser->verbose($Verbose); # TODO: implement default title generator in pod::simple::xhtml $Title = html_escape($Title); + # We need to add this ourselves because we use our own header, not + # ::XHTML's header. We still need to set $parser->backlink to linkify + # the =head1 directives + my $bodyid = $Backlink ? ' id=_podtop_' : ''; + my $csslink = ''; my $bodystyle = ' style="background-color: white"'; my $tdstyle = ' style="background-color: #cccccc"'; @@ -318,7 +324,7 @@ END_OF_BLOCK <link rev="made" href="mailto:$Config{perladmin}" /> </head> -<body$bodystyle> +<body$bodyid$bodystyle> $block HTMLHEAD |