On 8/30/06, Covert, Jake (JSC.) <[EMAIL PROTECTED]> wrote:
> Don't think this is a Perl error, so I'm thinking it's an HTML::Template
> error, maybe.
Yep, it's actually a Perl error. It's complaining about
"@{$vendor_hoh{$vendor}}" in line 85:
> 85 my ($rif, $rif_out, $graph, $raw, $per
I'm no expert, but I believe it's because you didn't pack the hash with
an array. For instance;
$tmplvar->{hashkey} = "aa" is wrong
$tmplvar->[0]->{hashkey} = "aa" is right
So for a hash of hashes your string would be
$tmplvar->[0]->{hashkey}->[0]->{hashkey} = "aa"
-Original Message-
I'm a bit new to html templates, so I apologize in advance if I ask some
obvious questions.
I'm working on an HTML::Template loop issue that I can't quite seem to get
working just right. Instead of an array of hashes, I'm using a hash of
hashes.
When I try and run it, it gives me this error:
Here's a short example.
my $template = HTML::Template->new( 'filename' => 'some.tmpl',
'loop_context_vars' => 1);
my $some_funky_loop = [..#array ref of hashrefs of stuff#.. ];
$template->param('SOME_LOOP' => $some_funky_loop);
$template->output();
# template
On 8/30/06, Di Dom
I’m trying to use the loop_context_var option for
HTML::Template. Specifically I’m looking at the __counter__ option.
When I do a dump on my hashref, I can see that it’s adding __counter__
along with the other vars, however, the counter var is always ‘undef’.
Is it supposed to be li