changeset 259:b92f19630d33

Merge with 91bae9f41a9cf2d52f5cff5a5c3e7c8683c7d47e
author sergey
date Fri, 21 Dec 2012 00:09:11 +0400
parents 299af584c05f (diff) 91bae9f41a9c (current diff)
children 2879cdb6b8cd
files
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Transform/ObjectToDOM.pm	Tue Dec 18 19:18:31 2012 +0400
+++ b/Lib/IMPL/DOM/Transform/ObjectToDOM.pm	Fri Dec 21 00:09:11 2012 +0400
@@ -79,7 +79,8 @@
         my $value = $data->{$key};
         
         if (ref $value eq 'ARRAY') {
-            foreach my $subval (@$value) {
+            #TODO: collapse empty values only if needed
+            foreach my $subval (grep $_, @$value) {
                 
                 $this->_navi->saveState();
                 
@@ -109,8 +110,6 @@
             
             $this->_navi->applyState();
             
-            warn "$key = $value";
-            
             $this->Transform($value);
             
             $this->_navi->Back();            
@@ -126,8 +125,6 @@
     
     $node->nodeValue($data);
     
-    warn "Stored value for", $node->nodeName;
-    
     return $node;
 }