Re: [htmltmpl] Patch to fix global_vars and loop problem...
Brought to you by:
samtregar
From: simran <sim...@re...> - 2004-05-18 06:07:26
|
Hi Sam, Did you decide on what to do with the submitted patch? simran. On Wed, 2004-05-12 at 16:51, simran wrote: > very good points :-) > > How is the attached as a patch... > > simran. > > > > > On Wed, 2004-05-12 at 14:09, Sam Tregar wrote: > > 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 > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Sleepycat Software > > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > > deliver higher performing products faster, at low TCO. > > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > > _______________________________________________ > > Html-template-users mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/html-template-users |