[ic] [interchange] Fix code which assumes we already have a hashref
Jon Jensen
jon at endpoint.com
Fri Nov 11 20:15:54 UTC 2016
On Fri, 11 Nov 2016, David Christensen wrote:
>> On 08/11/16 08:32, David Christensen wrote:
>>> Fix code which assumes we already have a hashref
>>> + $item = { 'code' => $item } unless ref $item;
>>> +
>>> return $item->{mv_cache_price}
>>> if ! $quantity and ref($item) and defined $item->{mv_cache_price};
>>>
>>> - $item = { 'code' => $item } unless ref $item;
>>
>> This does not look like it was broken before, it certainly did not
>> assume that we had a hashref as it specifically tested for it in the if
>> statement.
>
> True, I think I missed it ref() in that condition; had some across an
> error in an installation related to dereferencing a string and thought
> I’d found the solution. I could revert or just leave it, as it doesn’t
> have any practical difference; otherwise it’s just VCS noise at this
> point.
If you want to leave it the new way, I think we should remove this now
redundant check:
and ref($item)
so that at least the net result of the version control churn is one less
check of ref($item) in that same area. :)
Jon
--
Jon Jensen
End Point Corporation
https://www.endpoint.com/
More information about the interchange-users
mailing list