in reply to Can I automatically generate documentation from HTML::Template?

I'm not familiar with HTML::Template, but it should be trivial, either in code (probably with a minor subclassing) or by hand, to put a marker at the beginning and end of each template:

<!-- path/to/template --> ... <!-- /path/to/template -->

Hugo

  • Comment on Re: Can I automatically generate documentation from HTML::Template?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Can I automatically generate documentation from HTML::Template?
by toma (Vicar) on May 17, 2004 at 15:52 UTC
    When I have templates within templates, this approach is not as useful as I hoped, for large documents at least.

    I would prefer documentation that summarizes the hierarchical HTML structure and the variables used, perhaps even automatically generating diagrams.

    It seems that most general-purpose things like this that I can easily imagine have already been written. Perhaps another templating system has such a feature? If not, I can take care of it.

    It should work perfectly the first time! - toma

      If I understand you correctly, you want a central repository that contains the variables used in each template file. I don't know of any current tools for this. It shouldn't be too difficult, though. HTML::Template->param() in list context returns the names of all variables in the template. This may suffice for your purposes.

      ----
      : () { :|:& };:

      Note: All code is untested, unless otherwise stated