Re: [htmltmpl] retrieving default values

2011-11-17 Thread Michael Peters
;m afraid that this isn't possible. -- Michael Peters Plus Three, LP -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, secu

Re: [htmltmpl] TMPL_LOOP limit or count

2011-04-29 Thread Michael Peters
the __counter__ loop context var combined with HTML::Template::Expr. ... > Nothing in the docs suggests a way to do this (or am I missing something?). It's not possible with just HTML::Template, but HTML::T

Re: [htmltmpl] new work on HTML::Template

2011-04-07 Thread Michael Peters
don't have to ever do it again until something changes and we then have to restart. I could see releasing either your filter approach, or the approach by Krang as separate modules onto CPAN, but not general enough for H::T

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
rl get a little ugly but prevents the > speed hit. Maybe a new "lexical_vars" option that will fall back to a parent-loop or top-level declared var if one doesn't exist in the current loop? That would be similar to the way vars work in Perl loops. Is that what

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
me small bugs from RT and do some code organization changes (Dist::Zilla, perltidy, etc). I'll post an announcement when that happens. -- Michael Peters Plus Three, LP -- Xperia(TM) PLAY It's a major bre

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
ough, I could see the use in a tag. Thanks for the feedback. -- Michael Peters Plus Three, LP -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable netw

[htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
objects: + Add a tag. Could be useful for template driven behaviors (combined with param() or query()) or when combined with : Any questions? Comments? Verbal Abuse? Any offers of help? Thanks, -- Michael Peters Plus Three, LP ---

Re: [htmltmpl] Suggested Addition

2010-07-05 Thread Michael Peters
S But it doesn't have full query support. -- Michael Peters Plus Three, LP -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http

Re: [htmltmpl] Nested templates

2009-11-25 Thread Michael Peters
On 11/24/2009 09:24 PM, Brad Baxter wrote: > Is there a better way? I've done this by using a different name for each pass. So something like: So you run it through HTML::Template once to get the output and then s/http://p.sf.net/sfu/bobj-july ___

Re: [htmltmpl] Escaping unicode

2009-11-13 Thread Michael Peters
e a patched version of > H::T for my purposes with a method like param_escape() or sth like that, > right? No, please don't do that. Don't run with a patched version unless absolutely necessary. Instead go with a subcla

Re: [htmltmpl] Getting data from template?

2009-01-29 Thread Michael Peters
at's the max claimed by H::T::P) then you've taken a full 0.096 sec off. That little gain is just not worth it to me if you have to jump through hoops to make other things with with the module (like you're trying to do with H::T::Sec). Plus it doesn't support query() which

Re: [htmltmpl] Making a Copy of a template object

2008-12-19 Thread Michael Peters
use the same underlying template. Then you can use the same process that you're using to fill in one to fill in the other. -- Michael Peters Plus Three, LP -- ___ Html-tem

Re: [htmltmpl] Making a Copy of a template object

2008-12-18 Thread Michael Peters
have your object persist or be "stored" (clever name huh) somewhere then Storable is what you want. If you just want to clone the object, then use the Clone module. -- Michael Peters Plus Three, LP -- SF.Net

Re: [htmltmpl] Leaving tmp_var intact inside template

2008-07-28 Thread Michael Peters
on the 2nd pass. Just FYI, I've heard this technique named a couple of different things, in case you want to impress anyone :) It's usually called "2 pass templating" or "Write-thru cache templating". -- Michael Peters Plus Three, LP --

Re: [htmltmpl] HTML::Template escaping squashes HTML entities

2008-03-20 Thread Michael Peters
x27;t have mixed strings like you do, or we've moved on to UTF8 :) -- Michael Peters Plus Three, LP - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/M

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Michael Peters
the perl coder and pass that to the template, which seems a lot > of pointless effort If you're so concerned about doing it in your Perl code, then I'd do it with Javascript. Create extra image elements depending on the rating value. -- Mic

Re: [htmltmpl] Comments

2007-03-07 Thread Michael Peters
regardless of tmpl_if or not. die_on_bad_params prevents the Perl code from passing in vars that don't exist in the template, not the template from having unused vars. -- Michael Peters Developer Plus Three, LP - Take

Re: [htmltmpl] Comments

2007-03-07 Thread Michael Peters
> Is there a way to create a filter in HT that does the same thing? # This is a comment -- Michael Peters Developer Plus Three, LP - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techs

Re: [htmltmpl] benchmarking including output()

2007-01-25 Thread Michael Peters
then insert the time into that scalar. -- Michael Peters Developer Plus Three, LP - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your

Re: [htmltmpl] benchmarking including output()

2007-01-25 Thread Michael Peters
pUp does this is by creating a popup HTML, parsing the final HTML and inserting it right before the tag. -- Michael Peters Developer Plus Three, LP - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.ne

Re: [htmltmpl] LOOPING error [code included]

2006-12-05 Thread Michael Peters
ng for the existence of variables in loops if the same loop is used more than once. Setting die_on_bad_params to false will let you get around this problem, but that causes problems if you wanted strict templates in the first place. Fixing this has been one of my TODOs for a while... Stupid $wor

Re: [htmltmpl] Next H::T release.

2006-12-01 Thread Michael Peters
erted contexts > (ie: TMPL_UNLESS + TMPL_ELSE). In particular, it works well when > used with TMPL_ELSIF. Again, I'm ambivalent. > - Allow recursive H::T invocations for those cases where people > _realy_ want to do >... [ and thus deal with > the consequences of such an

Re: [htmltmpl] Suggestion on how to eliminate Cross-site-scripting (XSS) bugs for good.

2006-10-17 Thread Michael Peters
Alex Kapranoff wrote: > ESCAPE="0" works for now. Well, there you go, I didn't even know you could do that. Shlomi, I think using default_escape and escpe=0 for the exceptions is a much cleaner way to go. -- Michael Peters Develo

Re: [htmltmpl] Suggestion on how to eliminate Cross-site-scripting (XSS) bugs for good.

2006-10-17 Thread Michael Peters
There's `default_escape' option in recent HTML::Template. Is it not > enough? I think if you use default_escape => 'HTML' that would get him most of the way. But there should be a way to turn off escaping when you know the var will contain HTML. So ma

Re: [htmltmpl] Testing HTML::Template templates

2006-09-11 Thread Michael Peters
Not as easy to write. You can't just write one test that tests all your templates. Plus you need to make sure you exercise every case so that every template is used. I prefer #2. -- Michael Peters Developer Plus Three, LP ---

Re: [htmltmpl] Possibility to include files "dynamicly"

2006-07-04 Thread Michael Peters
mplate. In the code where you generate the data for the loop, create another template object, pass in the same variables, get it's output and then use that output as a var in your parent template. -- Michael Peters Developer Plus Three, LP Using Tomcat but need to do more? Need to suppor

Re: [htmltmpl] H::T::Expr and escape

2006-04-14 Thread Michael Peters
Michael Peters wrote: > > Sam Tregar wrote: >> On Fri, 14 Apr 2006, Michael Peters wrote: >> >>> So by making the "parser smart enough" do you mean copying that huge >>> regex from H::T and modifying it with the expr regex? >> Yeah, or u

Re: [htmltmpl] H::T::Expr and escape

2006-04-14 Thread Michael Peters
Sam Tregar wrote: > On Fri, 14 Apr 2006, Michael Peters wrote: > >> So by making the "parser smart enough" do you mean copying that huge >> regex from H::T and modifying it with the expr regex? > > Yeah, or using Parse::RecDescent. H::T::E already uses it

Re: [htmltmpl] H::T::Expr and escape

2006-04-14 Thread Michael Peters
Sam Tregar wrote: > On Thu, 13 Apr 2006, Michael Peters wrote: > >> Is it possible to combine the 'escape' attribute of H::T with >> H::T::Expr? > > No, I don't think so. I don't think it would be too hard to add > support for it though. HTML

[htmltmpl] H::T::Expr and escape

2006-04-13 Thread Michael Peters
Is it possible to combine the 'escape' attribute of H::T with H::T::Expr? I'm guessing not since any combination I've tried fails. If it's too hard to do, maybe a new function could be added so that you can do somthing like -- Michael Peters

Re: [htmltmpl] Validating documents from HTML::Template

2006-03-10 Thread Michael Peters
g.Am I missing something obvious here, or is > HTML::Template not a good idea for producing XHTML 1.0 compliant documents? H::T won't change anything about your template that isn't a tag. So something else is changing your . What other tools are you passing your output through? -- Mich

Re: [htmltmpl] verified something

2006-03-08 Thread Michael Peters
bals or package level vars hanging around. When H::T caches the template, it doesn't cache the output or the params you pass in, it just caches the compiled state of the template. -- Michael Peters Developer Plus Three, LP --- This SF

Re: [htmltmpl] Usage question

2006-03-06 Thread Michael Peters
the url to see what different states look like. They could also use something like Firefox + Tamper Data to even make it easier. Might be overkill but if you did it right it could be reuseable for different projects. -- Michael Peters Developer Plus Three, LP

[htmltmpl] possible bug

2006-01-24 Thread Michael Peters
mpt to set nonexistent parameter". Now, query() shows that the loop contains the variable, since at least one version does have it. I've attached an example. Is this expected behavior? -- Michael Peters Developer Plus Three, LP test.pl Description: Perl program

Re: [htmltmpl] Question about syntax

2004-08-11 Thread Michael Peters
is what Brad and I meant (I think) -- Michael Peters Developer Plus Three, LP --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on

Re: [htmltmpl] Question about syntax

2004-08-11 Thread Michael Peters
e isn't really a difference in which one you use (unless you are using other attributes besides name). Mainly just choices of style and just making you editor happy. -- Michael Peters Developer Plus Three, LP --- SF.Net email is sponsor

Re: [htmltmpl] Including templates where the name is dtermined at run time

2004-08-08 Thread Michael Peters
alar. Then load this scalar into the second, outer template. HTH -- Michael Peters Developer Plus Three, LP --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past

Re: [htmltmpl] HTML::Template

2004-08-03 Thread Michael Peters
"; just like that before you print anything else. Or you could use CGI.pm like this... use CGI; my $q = CGI->new(); print $q->header(); HTH Michael Peters Developer Plus Three, LP --- This SF.Net email is sponso