So I've got a bunch of function calls. Each call takes in 3 parameters. I have an 'if' statement attached to each call. There's something faulty in those statements. Can you discover it? How would you rewrite this mess? The order of the calls are important. It must stay in this order.
get_updates($objects[0], 'agency_id', $result_ref->{'agency_id'}) if +(defined $result_ref->{'agency_id'} && $result_ref->{'agency_id'} != +0); get_updates($objects[1], 'advertiser', $result_ref->{'advertiser'}) if + (defined $result_ref->{'advertiser'} && $result_ref->{'agency_id'} ! += 0); get_updates($objects[2], 'campaign_id', $result_ref->{'campaign_id'}) +if (defined $result_ref->{'campaign_id'} && $result_ref->{'agency_id' +} != 0); get_updates($objects[3], 'contact_id', $result_ref->{'admin_contact_id +'}) if (defined $result_ref->{'admin_contact_id'} && $result_ref->{'a +gency_id'} != 0); get_updates($objects[3], 'contact_id', $result_ref->{'tech_contact_id' +}) if (defined $result_ref->{'tech_contact_id'} && $result_ref->{'age +ncy_id'} != 0);
In reply to How would you rewrite this? by jacques
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |