[ic] [interchange] * Back out previous change, exists for array is deprecated in

Peter peter at pajamian.dhs.org
Mon Jun 17 20:27:31 UTC 2013


On 06/18/2013 08:18 AM, Mike Heins wrote:
> Quoting Peter (peter at pajamian.dhs.org):
>> On 06/18/2013 07:16 AM, Mike Heins wrote:
>>> commit 2b063379db2a7c0e876c62143933ea3d7f221354
>>> Author: Mike Heins <mike at perusion.com>
>>> Date:   Mon Jun 17 15:16:05 2013 -0400
>>>
>>>      * Back out previous change, exists for array is deprecated in
>>>        Perl and we should not add new change based on that.
>>
>> This should work:
>>
>> next if $i > $#fields;
>
> Yes, actually could be
>
>    last if $i > $#fields;

Only if $i is actually incrementing.  From the looks of the code it is 
not and could jump all around since the order of keys in perl is not 
guaranteed and is in fact guaranteed to change for each running of the 
program:
  		for (keys %{$cfg->{PREFER_NULL}}) {
  			my $i = $cfg->{COLUMN_INDEX}{$_};

Peter



More information about the interchange-users mailing list