[licensecheck] 05/112: Fix delimit multiple licenses with "and/or" (not "or") when ambiguous.

Jonas Smedegaard dr at jones.dk
Fri Nov 25 22:01:29 UTC 2016


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

js pushed a commit to branch master
in repository licensecheck.

commit 9691e38a562ab21cabad21123dfdd2f8ab0afd6c
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Fri Sep 16 17:44:01 2016 +0200

    Fix delimit multiple licenses with "and/or" (not "or") when ambiguous.
---
 lib/App/Licensecheck.pm | 4 ++--
 t/license.t             | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index 0bc1792..d7ed902 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -551,7 +551,7 @@ sub parse_license
 	given ($licensetext) {
 		when ( /This (program )?is free software; you can redistribute it and\/or modify it under the same terms as (the )?Perl( ?5)? (programming |language |system )*itself/ ) {
 			$license = "Perl $license";
-			push @spdx_license, 'Artistic', 'GPL';
+			push @spdx_license, 'Artistic or GPL';
 		}
 	}
 	given ($licensetext) {
@@ -678,7 +678,7 @@ sub parse_license
 
 	# Remove trailing spaces.
 	$license =~ s/\s+$//;
-	return $self->deb_fmt ? join( ' or ', @spdx_license ) : $license;
+	return $self->deb_fmt ? join( ' and/or ', @spdx_license ) : $license;
 }
 
 =encoding UTF-8
diff --git a/t/license.t b/t/license.t
index 4f72ba3..25b739c 100644
--- a/t/license.t
+++ b/t/license.t
@@ -51,7 +51,7 @@ run_me(
 			[qw(lgpl-2.1.c lgpl-2.1.h lgpl-by-dist-zilla.pl lgpl-big-blue.h)]
 	}
 );
-run_me( { license => 'LGPL-2.1 or LGPL-3', corpus => 'lgpl-digia.c' } );
+run_me( { license => 'LGPL-2.1 and/or LGPL-3', corpus => 'lgpl-digia.c' } );
 run_me( { license => 'LGPL-2.1+', corpus => 'comments-detection.txt' } );
 run_me( { license => 'LGPL-2',    corpus => 'lgpl-2.s' } );
 run_me(

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



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