From: "Sam Tregar" <[EMAIL PROTECTED]>
> The loop output code calls param() to setup each row.
I see it now. The output method calls the package HTML::Template::LOOP which
calls param(). It would take some work to 1) collect (in a hash)
die_on_bad_param flags when the user calls param() with an ar
(A work-around, expanding on Mark Fuller's suggestion:)
On Thu, Jul 07, 2005 at 02:27:08PM +0200, Matija Grabnar wrote:
>
>
>
>
>
>
>
R
---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to
On Thu, 7 Jul 2005, Mark Fuller wrote:
> From: "Sam Tregar" <[EMAIL PROTECTED]>
> > That's a run-time error that happens during output() and the relevent file
> and
> > line numbers are currently only available during parse().
>
> Sam, I'm curious: Why wouldn't my suggestion work?
I didn't mean
From: "Sam Tregar" <[EMAIL PROTECTED]>
> That's a run-time error that happens during output() and the relevent file
and
> line numbers are currently only available during parse().
Sam, I'm curious: Why wouldn't my suggestion work? The croaked message
Matija referred to is in the param method. I ca
From: "Matija Grabnar" <[EMAIL PROTECTED]>
> Setting up the loops would be expensive, since it involves a LOT of data
You may already know this. It would be fairly easy for you to subclass H::T
to use your own modified param method. Modify it to accept a second
parameter:
@foo=({bar=>1,b
On Thu, 7 Jul 2005, Matija Grabnar wrote:
> And die_on_bad_params is usualy a very usefull debugging tool, which
> is why I need it. At least, if it dies in the loop, HTML::Template
> should tell you WHICH loop it died in (in which line the loop
> began).
Now that's a patch I'd take! Warning -
Jason Purdy wrote:
IMVHO, this isn't a bug, but rather the intended behavior. If you
really want to be strict about it, set up two different loops.
Otherwise, don't worry about die_on_bad_params.
- Jason
Setting up the loops would be expensive, since it involves a LOT of data
- it would
b
IMVHO, this isn't a bug, but rather the intended behavior. If you
really want to be strict about it, set up two different loops.
Otherwise, don't worry about die_on_bad_params.
- Jason
Matija Grabnar wrote:
For example
Template:
Script:
#!/usr/bin/perl
use HTML::Template;
$t=HTML
For example
Template:
Script:
#!/usr/bin/perl
use HTML::Template;
$t=HTML::Template->new(filename=>'0.tmpl');
@foo=({bar=>1,baz=>2},{bar=>3,baz=>4});
$t->param(foo=>[EMAIL PROTECTED]);
print $t->output;
Result:
HTML::Template->output() : fatal error in loop output : HTML::Template :