[wellwell-devel] [wellwell/zoom] Avoid Perl warnings.

Stefan Hornburg wellwell-devel at rt.icdevgroup.org
Sun Aug 15 14:59:45 UTC 2010


commit baba26cd2de7b45a9582aa3fff004c86f87c48f9
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Sun Aug 15 16:59:16 2010 +0200

    Avoid Perl warnings.

 lib/WellWell/Zoom.pm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/WellWell/Zoom.pm b/lib/WellWell/Zoom.pm
index 07366c2..b6a4408 100644
--- a/lib/WellWell/Zoom.pm
+++ b/lib/WellWell/Zoom.pm
@@ -61,7 +61,9 @@ sub zoom {
 
 		# now determine which fields are needed
 		while (($key, $value) = each %{$sref->{params}->{$name}->{hash}}) {
-			push @{$bref->{columns}->{$value->{table}}}, $value->{field} || $key;
+			if (exists $value->{table}) {
+				push @{$bref->{columns}->{$value->{table}}}, $value->{field} || $key;
+			}
 		}
 
 		($sql, $bind) = build_select(%$bref);
@@ -196,7 +198,7 @@ sub parse_handler {
 				# determine code reference for named function
 				my $subref = $Vend::Cfg->{Sub}{$sob->{sub}} || $Global::GlobalSub->{$sob->{sub}};
 
-				if ($sob->{scope} eq 'element') {
+				if (exists $sob->{scope} && $sob->{scope} eq 'element') {
 					$elt->{zoom_rep_sub} = $subref;
 				}
 				else {



More information about the wellwell-devel mailing list