Outaspace has asked for the wisdom of the Perl Monks concerning the following question:

Blessings be upon you fellow Monks,

I just wanted to start writing some code to create a sitemap out of a Pod-Html File Index section. But then I wondered if this was maybe done allready. I found WWW::Sitemap on CPAN, but it seems that this only builds a sitemap for external (not anchors in the same document) links. Does anyone know of anything else, that I can use.

Humble,

Andre

Replies are listed 'Best First'.
Re: Creating a Sitemap for a Pod-Html File
by doom (Deacon) on Sep 23, 2006 at 03:10 UTC
    It might help if you clarified your question a little bit... if I understand you, you want some code that will crawl a tree of perl code, mapping out where the L<> links inside the pod are pointing?

    If you have a method that works by following html links (I haven't played with WWW::Sitemap), I might suggest that you first convert the pod into html, and then create your sitemap from there.

    Pod::Simple::HtmlBatch is probably the right way to go from Pod to html... I wrote a little review of it awhile back (and provided a pointer to a summary of my results from investigating that problem): Pod::Simple::HtmlBatch

      I currently use Pod::Html to convert my POD sections to a Html file. Now I want to create a sitemap for a single file. This is not really a sitemap, cause it only looks at one file and should only extract the anchors in the index section of this file. The goal would be to get a tree that can be used in a TreeCtrl to jump to the anchors in the Html file, without allways getting to the start of the file(where the index is). I would prefer something similiar to the sitemap format, cause I also would like to add CHM files later and they use sitemap for their tree. So if I extract a sitemap out of a single POD file I do not need to implement two different solutions for the TreeCtrl.

      Andre