Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

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

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


peter at pajamian

Jun 17, 2013, 1:13 PM

Post #1 of 4 (86 views)
Permalink
Re: [interchange] * Back out previous change, exists for array is deprecated in

On 06/18/2013 07:16 AM, Mike Heins wrote:
> commit 2b063379db2a7c0e876c62143933ea3d7f221354
> Author: Mike Heins <mike [at] perusion>
> 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;


Peter

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


mike at perusion

Jun 17, 2013, 1:18 PM

Post #2 of 4 (81 views)
Permalink
Re: [interchange] * Back out previous change, exists for array is deprecated in [In reply to]

Quoting Peter (peter [at] pajamian):
> On 06/18/2013 07:16 AM, Mike Heins wrote:
> >commit 2b063379db2a7c0e876c62143933ea3d7f221354
> >Author: Mike Heins <mike [at] perusion>
> >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;

--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.253.4194 <mike [at] perusion>

Software axiom: Lack of speed kills.

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


peter at pajamian

Jun 17, 2013, 1:27 PM

Post #3 of 4 (81 views)
Permalink
Re: [interchange] * Back out previous change, exists for array is deprecated in [In reply to]

On 06/18/2013 08:18 AM, Mike Heins wrote:
> Quoting Peter (peter [at] pajamian):
>> On 06/18/2013 07:16 AM, Mike Heins wrote:
>>> commit 2b063379db2a7c0e876c62143933ea3d7f221354
>>> Author: Mike Heins <mike [at] perusion>
>>> 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

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


mike at perusion

Jun 17, 2013, 1:39 PM

Post #4 of 4 (81 views)
Permalink
Re: [interchange] * Back out previous change, exists for array is deprecated in [In reply to]

Quoting Peter (peter [at] pajamian):
> On 06/18/2013 08:18 AM, Mike Heins wrote:
> >Quoting Peter (peter [at] pajamian):
> >>On 06/18/2013 07:16 AM, Mike Heins wrote:
> >>>commit 2b063379db2a7c0e876c62143933ea3d7f221354
> >>>Author: Mike Heins <mike [at] perusion>
> >>>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}{$_};
>

Aha, yes, of course you are right. In any case, while I am not sure
what autovivification hurts, it is probably not the best thing to do.
I will make the appropriate fix.

--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.253.4194 <mike [at] perusion>

Fast, reliable, cheap. Pick two and we'll talk.
-- unknown

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.