[ic] setting lookup_exclude does not work
Mike Heins
mike at perusion.com
Fri Mar 4 14:55:45 UTC 2011
Yes, I see the problem. Thank you.
I have made a different patch which removes the subroutine
entirely, which should improve performance markedly.
Quoting Andrew Baerg (andrew.baerg at gmail.com):
> I am upgrading a 4.8 install to 5.7 and ran into an issue when
> lookup_exclude is set for a field in mv_metadata. It seems to cause
> the display sub in Vend.pm to return prematurely.
>
> I have attached a patch which fixes the issue for me.
>
> --
> Andrew
> From f626b7c5a41e66150299566c633a1d14bcc0035b Mon Sep 17 00:00:00 2001
> From: Andrew <baerg at yoursole.com>
> Date: Tue, 1 Mar 2011 09:31:52 -0700
> Subject: [PATCH] bug fix: lookup_exclude causing premature return from display sub
>
> ---
> lib/Vend/Form.pm | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/Vend/Form.pm b/lib/Vend/Form.pm
> index a08fd91..6436c32 100644
> --- a/lib/Vend/Form.pm
> +++ b/lib/Vend/Form.pm
> @@ -1285,9 +1285,8 @@ if($opt->{debug}) {
> if($sub) {
> @$data = grep $_,
> map {
> - $sub->(join '=', @$_)
> - or return undef;
> - return $_;
> + if ($sub->(join '=', @$_)) { $_; }
> + else { undef; }
> } @$data;
> }
> }
> --
> 1.7.0.4
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.328.4479 <mike at perusion.com>
Those who bring sunshine into the lives of others
cannot keep it from themselves. -- James Barrie
More information about the interchange-users
mailing list