On 2005-08-07, Sam Tregar <[EMAIL PROTECTED]> wrote: > 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.
Interesting. I hadn't heard of that technique being used before. I do recall that this feature could be accomplished somewhat automatically if code refs were used for values-- the code refs would only be executed if they were used. I have rarely needed that myself. This seems like a reasonable default for people who aren't using die_on_bad_params (which seems to be a lot of users). >> It can output human-friendly YAML, which could simply be wrapped >> in a <pre> tag to complete the presentation. > > Heh. Human-friendly YAML, huh? Yes. It's the first bullet point on the YAML website: "YAML documents are very readable by humans." I agree, from looking at the example: http://www.yaml.org/start.html > I'd aim for something a little > friendlier than that - like formatted HTML. If the feature was implemented, I wouldn't argue over whether YAML or formatted HTML. > BTW - your pluggable stuff looks great. Thanks! > 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, There would be some immediate benefits. I believe being in-core would mean my "Dot" plugin could be used with HTML::Template::Set immediately, for those who cared to use both together. In the ::Pluggable sub-class, ::Set has to be be re-written as a plugin to cooperate. > if only because that would put you at the mercy of my absurdly slow > release schedule... I'm really hoping the simple bug report for removing a hardcoded package name can be released soon, because even as a ::Pluggable sub-class, we depend on that patch. I'm also help to with release engineering. For example, I could prepare things in CVS and you could refine them for release, or basically "bless" something if you liked it. Of course, CVS is not the most flexible source control system. With a system like darcs, you could really "undo" a patch of mine you didn't like. While CVS, reversing or undoing a patch that touched multiple files would be rather painstaking. I've been doing something like this to help the CGI::Session 4.0 release get out the door using SVN. Mark -- http://mark.stosberg.com/ ------------------------------------------------------- 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 _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users