[libconfig-model-dpkg-perl] 05/11: dont store empty lines in non-string element

dod at debian.org dod at debian.org
Fri Jan 13 13:01:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 0c473b6cd22251579fd138b818c919ec097eddf0
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Jan 10 12:57:03 2017 +0100

    dont store empty lines in non-string element
---
 lib/Config/Model/Backend/DpkgStoreRole.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Config/Model/Backend/DpkgStoreRole.pm b/lib/Config/Model/Backend/DpkgStoreRole.pm
index 560d6d1..02410f4 100644
--- a/lib/Config/Model/Backend/DpkgStoreRole.pm
+++ b/lib/Config/Model/Backend/DpkgStoreRole.pm
@@ -46,11 +46,12 @@ sub store_section_list_element ($self, $logger, $list_obj, $check, $v_ref) {
 
 sub store_section_leaf_element ($self, $logger, $elt_obj, $check, $v_ref) {
     # v_ref is a list of (@comment , [ value, $line_nb ,$note ] )
+    my $value_type = $elt_obj->value_type;
 
     my (@v, at comment, at note);
     foreach my $v_item ( $v_ref ->@* ) {
         if (ref $v_item) {
-            push @v, $v_item->[0];
+            push @v, $v_item->[0] if $value_type eq 'string' or $v_item->[0] =~ /\S/;
             push @note, $v_item->[2];
         }
         else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list