Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Can I automatically generate documentation from HTML::Template?

by hv (Prior)
on May 17, 2004 at 12:55 UTC ( [id://353947]=note: print w/replies, xml ) Need Help??


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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://353947]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found