package ActivePerl::DocTools::TOC::HTML; use strict; use warnings; use base 'ActivePerl::DocTools::TOC'; sub text { my $text = join("\n", @_, ""); return sub { $text }; } # extra info is tedious to collect -- is done in a subclass or something. sub extra { '' }; *header = text ("","
","Perl Core Documentation","' } # scripts *before_scripts = text("
","Programs
","' } # pragmas *before_pragmas = text("
","Pragmas
","' } # libraries *before_libraries = text("
","Modules
","' } *footer = text("\n\n\n\n"); sub _page { my($href, $text, $extra) = @_; die "bad arguments to _page: ($href, $text, $extra)" unless defined $href and defined $text; $extra ||= ''; $extra = " $extra" if $extra; # just to make it EXACTLY identical to the old way. return qq'$text$extra\n'; } sub boilerplate { return boiler_header() . boiler_links(); } sub boiler_header { return <<'HERE'; ActivePerl User Guide - Table of Contents

Table of Contents

HERE } sub boiler_links { my $retval = <
HERE return $retval; } sub PerlEx_links { return "" unless -e "$ActivePerl::DocTools::TOC::dirbase/PerlEx/Welcome.html"; return <PerlEx HERE } 1;