in reply to Re: optimization - exists should return a reference
in thread optimization - exists should return a reference
Surely
exists $_->{$client} and return $_->{$client} for $export_def->{'..client_default_version'};
Would just become
return $$_ if $_ = exists $export_def{'..client_default_version'}{$cli +ent};
Which gives the desired once-and-once-only behaviour?
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
---|