Re: [htmltmpl] Patch to fix global_vars and loop problem...
Brought to you by:
samtregar
From: Sam T. <sa...@tr...> - 2004-05-12 04:14:15
|
On Wed, 12 May 2004, simran wrote: > + foreach my $row (@$value) { > + foreach my $key (keys %$row) { > + $row->{$key} ||= ""; > + } > + } Hmmmm. What happens when $row->{$key} is "0"? What happens when undef is set in a loop within a loop? I think the real fix is to find a way to use exists() rather than defined() when looking for the variable setting. That way it doesn't matter what the value of the var is, just whether it's set or not. Maybe you could give that a try? Thanks, -sam |