From: "Carl Franks" <[EMAIL PROTECTED]>

> If you make sure
> die_on_bad_params => 1
> is set in your HTML::Template constructor, then any variable which
> isn't set in the template, or is misspelt will cause the page to die -
> the designer can then tell what's wrong by simply looking at the error
> message.
>
> Carl
>


This is not always simple.
Sometimes the error says only something like... that the variable "id" is
not present in the template file.
But if I take a look in the main program, I see that there is no "id"
defined with:

$ht->param(id => $id);

Usually the key "id" is included in another variable but this is not very
easy to find, because that variable might be returned by a separate module,
and I don't even know in which variable is defined that "id" key.
Maybe more variables which are returned by the modules contain an "id" field
but I don't know which of them is wrong.

It would be more helpful if H::T would also say (in that error) the name of
the loop that created the error. In that case it would be more simple to
find the variable which has some bad keys in it.

But if die_on_bad_params => 0, will this make T::H work slower?
I have some modules that return more variables than I need in a certain
template because I need them in other templates or programs, and I don't
want to create more if() statements or more variables in order to send just
the needed vars, so I usually prefer sending more variables than the
template files need.


Thanks.

Teddy



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to