in reply to How would you rewrite this?
I could be mistaken, but doesn't && bind more tightly than !=? Shouldn't you be putting parens around the second test in each case?
If it were me, with such lengthy conditions, I would probably turn the statement modifiers around into regular conditionals, like this...
if (defined $result_ref->{'agency_id'} and $result_ref->{'agency_id'} != 0) { get_updates($objects[0], 'agency_id', $result_ref->{'agency_id'}); }
But that's perhaps just a matter of personal style.
|
|---|