Re: wish: <tmpl_dump>

Sam Tregar <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
On Sat, 6 Aug 2005, Mark Stosberg wrote:

> It should be easier for a designer to get an answer to the question:
> "What tokens do I have available?" 
> 
> I think there is a fairly reasonable way to make this easier. 
> 
> A <tmpl_dump> tag could be added which outputs all the possible
> tmpl_loop tmpl_var names, along with their values, right in the
> template.

It sounds nice but I'd personally find it pretty useless.  Most of my
use of HTML::Template involves inspecting the template with query()
and setting up the variables and loops that are actually requested.
This is how Krang works, for example.

> It can output human-friendly YAML, which could simply be wrapped
> in a <pre> tag to complete the presentation.

Heh.  Human-friendly YAML, huh?  I'd aim for something a little
friendlier than that - like formatted HTML.

BTW - your pluggable stuff looks great.  I'm fresh out of time to look
at it more closely but I think you're on the right track.  I'm not
completely convinced it belongs in-core yet, if only because that
would put you at the mercy of my absurdly slow release schedule...

-sam


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.