package ActivePerl::DocTools::TOC::HTML::Podmaster; use strict; use warnings; use ActivePerl::DocTools::TOC::HTML; use base qw( ActivePerl::DocTools::TOC::HTML ); our $VERSION = 0.01; # The ActivePerl guys commented out the pod for ActivePerl::DocTools, +thus # making things ugly, so I gots to fix that sub new { my $self = shift; $self = $self->SUPER::new(@_); $self->{'filez'}->{'ActivePerl'}='' unless exists $self->{'filez'} +->{'ActivePerl'}; $self->{'filez'}->{'ActivePerl::DocTools'}='' unless exists $self- +>{'filez'}->{'ActivePerl::DocTools'}; $self->{'filez'}->{'ActivePerl::DocTools::TOC'}='' unless exists $ +self->{'filez'}->{'ActivePerl::DocTools::TOC'}; return $self; } sub boilerplate {q[ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>ActivePerl User Guide - Table of Contents</title> <base target="PerlDoc"> <style type="text/css"> .blend { color: #FFFFFF; font-weight: normal; } .padround { font-weight: bold; padding-right: 1px; } </style> <link rel="STYLESHEET" href="Active.css" type="text/css"> </head> <body> <h1>Table of Contents</h1> <div nowrap> ]. ( exists $_[0]->{"\0_boiler_links"} ? $_[0]->boiler_links() : "" ) +} sub library { my( $self, $modulename, $turnIntoLink) = @_; my $depth = "&nbsp;" x 2; if( $modulename =~ /::/ ) { $depth .= $modulename; $depth =~ s{(.*?)::$turnIntoLink}{<span class="blend">$1</span +><span class="padround">::</span>}; return $depth.qq[<a href="$self->{filez}->{$modulename}">$turn +IntoLink</a><br>]; } return _folder(qq[<a href="$self->{filez}->{$modulename}">$turnInt +oLink</a>]); } sub library_container { # warn "\n\nlibrary_container\n", sprintf join("\n",map{'%s'}1..@_) + ,@_; my ($self, $module, $show, $depth) = @_; $depth = ""; if( $module =~ /::/ ) { $depth = "&nbsp;&nbsp;$module"; $depth =~ s/^(.*?)::$show$/$1/; $depth = qq[<b class="blend">$depth</b>]; } return $depth._folder($show); } sub _folder { my ($text) = @_; defined $text or die "no argument to _folder!"; return qq'<img src="images/greysmallbullet.gif" width="5" height=" +5" alt="*"> $text<br>\n'; } our $dirbase = $ActivePerl::DocTools::TOC::dirbase; *main::WriteTOC = \&WriteTOC; # forget Exporter sub WriteTOC { my $fh; unless (open $fh, '>', "$dirbase/perltoc.html") { warn "Unable to open $dirbase/perltoc.html for writing: $!\n"; return undef; } my $html_toc = ActivePerl::DocTools::TOC::HTML::Podmaster->new(); $html_toc->{"\0_boiler_links"} = 1 if @_; print $fh $html_toc->TOC(); } 1; =head1 NAME ActivePerl::DocTools::TOC::HTML::Podmaster - better TOC than standard =head1 SYNOPSIS perl -MActivePerl::DocTools -e UpdateHTML() perl -MActivePerl::DocTools::TOC::HTML::Podmaster -e WriteTOC() perl -MActivePerl::DocTools -e UpdateHTML() perl -MActivePerl::DocTools::TOC::HTML::Podmaster -e WriteTOC(1) If you pass 1 to WriteTOC ActivePerl FAQ and Windows Scripting part of the toc will also be printed (I avoid these ;) =head1 DESCRIPTION This is the ActivePerl::DocTools generated TOC according to podmaster. Now you can hit Ctrl-F in your browser, and type in Data::Dumper and actually find it. Still looks pretty ;) =head1 AUTHOR podmaster of perlmonks.org fame =head1 SEE ALSO The sourcecode to ActivePerl::DocTools::TOC, ActivePerl::DocTools::TOC +::HTML =cut

In reply to ActivePerl::DocTools::TOC::HTML::Podmaster by PodMaster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.