[libconfig-model-dpkg-perl] 01/04: fix license split in short names

dod at debian.org dod at debian.org
Wed May 24 15:50:14 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 647f5e4e178efb4e38a911effe7397602d9ef1df
Author: Dominique Dumont <dod at debian.org>
Date:   Mon May 22 21:07:20 2017 +0200

    fix license split in short names
    
    split does special thing when the split regexp has capture groups. This
    is not wanted here.
    
    Do not use capture otherwise, @sub_licenses may contain 'or' or 'and'.
---
 lib/Config/Model/Dpkg/Copyright/License.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Config/Model/Dpkg/Copyright/License.pm b/lib/Config/Model/Dpkg/Copyright/License.pm
index b9747ec..e683068 100644
--- a/lib/Config/Model/Dpkg/Copyright/License.pm
+++ b/lib/Config/Model/Dpkg/Copyright/License.pm
@@ -66,7 +66,7 @@ sub _get_unused_licenses ($self, @licenses) {
 
         next unless $names; # may be undef when user is filling values
 
-        my @sub_licenses = split /[,\s]+(or|and)[,\s]+/,$names;
+        my @sub_licenses = split /[,\s]+(?:or|and)[,\s]+/,$names;
         map { delete $unused{$_}; } @sub_licenses;
     }
 

-- 
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