in reply to Convert nested list HTML TOC to JS Tree ?

Nice hack.

I'm not aware of a CPAN Module, but that's just me, and yes, I think it could be CPAN worthy. You might want to post the POD as a RFC meditation to get more feedback.

But without looking at the source, I see two distinct tasks in your hack:

There are some modules which do the first part, not necessary with HTML input. Pod::Simple::SimpleTree comes to mind. I would suggest to provide the JavaScript generating via your module with interfaces to existing tree generating modules.

On the name - maybe Tree::JS::dTree, since it could be used for other trees than just HTML lists?

Minor nit - your converted page lacks the TOP id in the box div :-)

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: Convert nested list HTML TOC to JS Tree ?