Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread Alex
Hi!

Mostly the same here. I like it for testing and the only reason I can think
of why it should be disabled is that you want to avoid setting params
specific for your template.
I kind of like the strict behavior on a second way: it remind me of use
strict with scopes 'n stuff, but that may be just a subjective preference.

Hth, Alex

-Ursprüngliche Nachricht-
Von: cgiapp-boun...@lists.erlbaum.net
[mailto:cgiapp-boun...@lists.erlbaum.net] Im Auftrag von r...@savage.net.au
Gesendet: Mittwoch, 11. November 2009 03:30
An: CGI Application
Betreff: Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

Hi Mark

Quoting Mark Stosberg m...@summersault.com:

 To proceed, I'd like to hear at least a small chorus of voices  
 claiming that the they use
 the die_on_bad_params feature.

I always use it, since in testing I want to know immediately if there  
is a problem.

I assume those who don't use it do so in order to avoid having to set  
every parameter in the template. Is that right?


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####

Eingehende eMail ist virenfrei.
Von AVG überprüft - www.avg.de 
Version: 9.0.704 / Virendatenbank: 270.14.59/2494 - Ausgabedatum: 11/10/09
08:38:00 


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread Gurunandan R. Bhat
On Tue, 2009-11-10 at 20:56 -0500, Mark Stosberg wrote:

 To proceed, I'd like to hear at least a small chorus of voices claiming that 
 the they use
 the die_on_bad_params feature. 
 


I use it all the time as an alternative to an if-then-else: if a piece
of content is not to be displayed, I just dont define its template
variable.
But from the tone of your and following messages, I sense that I am
doing something Seriously Bad (TM). If that is the case, I would be
happy to hear reasons.



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread P Kishor
..
 I don't know how many people use die_on_bad_params, so I don't
 know how worth it it is to modify the core.
..

I use it exclusively, under the assumption that, like 'use strict', it
is just best practice, may make my code faster and less error-ridden,
and may endow me with good looks and untold riches. I have no
scientific basis for the above assumptions.


-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, Wisconsin, United States

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread Michael Peters
On 11/11/2009 10:46 AM, P Kishor wrote:

 I use it exclusively, under the assumption that, like 'use strict', it
 is just best practice,

But a real question I have is, should designers (who are the ones 
creating these, or at least that's one of it's benefits is that they 
can) be burdened with strict when the environment they operate in 
(HTML, CSS) is inherently not strict.

  may make my code faster

I seriously doubt this. Especially if your code has to do lots of 
$tmpl-query() stuff to make sure that a variable is present before 
doing a $tmpl-param().

 and less error-ridden,

The only error I know that this catches is a misspelling on the 
programmer's side. Which I'll admit is a real problem. But in most of my 
cases, it's a problem that's easily seen because the data does not show 
up where it should.

 and may endow me with good looks and untold riches

Maybe if you rub Sam Tregar's belly. But I'd be careful, he's got a mean 
right hook :)

-- 
Michael Peters
Plus Three, LP

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread Mark Stosberg
On Wed, 11 Nov 2009 02:30:21 +
r...@savage.net.au wrote:

 Hi Mark
 
 Quoting Mark Stosberg m...@summersault.com:
 
  To proceed, I'd like to hear at least a small chorus of voices  
  claiming that the they use
  the die_on_bad_params feature.
 
 I always use it, since in testing I want to know immediately if there  
 is a problem.
 
 I assume those who don't use it do so in order to avoid having to set  
 every parameter in the template. Is that right?

As a standard part of our toolkit, we make all of our config variables
always available to the template, with a cfg_ prefix appended to their
name. 

So, the designer knows for instance she has the option to put 
!-- tmpl_var cfg_root_uri --
in the template, but it is not required on every page. 

If we need to precisely test the template, we can use a simple regex
match to check that tokens appear in the file, our we can use
html_tmpl_class() and HTML::Template::Dumper for a more formal
approach. 

Mark

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark StosbergPrincipal Developer  
   m...@summersault.com Summersault, LLC 
   765-939-9301 ext 202 database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread ron
Hi Michael

Quoting Michael Peters mpet...@plusthree.com:

 On 11/11/2009 10:46 AM, P Kishor wrote:

 I use it exclusively, under the assumption that, like 'use strict', it
 is just best practice,

 But a real question I have is, should designers (who are the ones
 creating these, or at least that's one of it's benefits is that they
 can) be burdened with strict when the environment they operate in
 (HTML, CSS) is inherently not strict.

This is a pathetic argument!

Just because X is non-strict does not justify refusing to use strict  
in Y, when the whole point of strictness is to help improve software  
reliability.

I.e. it's not a case of less strictness is better, but rather, more is  
- without being fanatical of course...

Strictness is not the burden, bugs are :-).


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread ron
Hi Michael

 Looking back at all of my projects that use HTML::Template I can
 honestly say that die_on_bad_params has caused more problems then it's
 fixed for me. It's not an argument against reliability but rather for
 it. If a valid template change causes an ISE (rather than just an
 invalid display) I'd say your software is less reliable. You now need a
 developer to fix what was supposed to be a design problem.

Oh. I go by the fact that at least 99% of the template problems I've  
caught by testing, i.e. before putting the template into production.


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] proposal for new cgiapp hook: loaded_html_tmpl

2009-11-11 Thread Alex
  This is a pathetic argument!

 If die_on_bad_params makes it harder for designers to use and less like 
 the tools they are used to using, how can that be a pathetic argument.

  Just because X is non-strict does not justify refusing to use strict
  in Y, when the whole point of strictness is to help improve software
  reliability.

 Looking back at all of my projects that use HTML::Template I can 
 honestly say that die_on_bad_params has caused more problems then it's 
 fixed for me. It's not an argument against reliability but rather for 
 it. If a valid template change causes an ISE (rather than just an 
 invalid display) I'd say your software is less reliable. You now need a 
 developer to fix what was supposed to be a design problem.

That ist he argument I always hear from people not using strict when getting
the advice to use strict. Of course, if no strict was used, using strict
causes problems, e.g. by aborting for each non declared variable. But that
is not the point. The point is, to avoid errors and bugs and unvorseen
behavior by using strict in the first place.


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####