SOURCES: pldcpan.pl - if no license was found in metadata then che...

migo migo at pld-linux.org
Fri Nov 11 21:35:49 CET 2005


Author: migo                         Date: Fri Nov 11 20:35:49 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- if no license was found in metadata then check POD for typical phrase
- cosmetics

---- Files affected:
SOURCES:
   pldcpan.pl (1.29 -> 1.30) 

---- Diffs:

================================================================
Index: SOURCES/pldcpan.pl
diff -u SOURCES/pldcpan.pl:1.29 SOURCES/pldcpan.pl:1.30
--- SOURCES/pldcpan.pl:1.29	Fri Nov 11 21:26:20 2005
+++ SOURCES/pldcpan.pl	Fri Nov 11 21:35:44 2005
@@ -141,6 +141,9 @@
 		  $info->{META_yml}->{license} =~ /^l?gpl$/
 		  ? uc $info->{META_yml}->{license}
 		  : $info->{META_yml}->{license};
+	# This depends on test_find_summ_descr2
+	} elsif (my $license = $info->{pod_license}) {
+		$info->{license} = 'perl' if $license =~ /same terms as perl/i;
 	}
 	$info->{_tests}->{license} = $info->{license} ? 1 : 0;
 }
@@ -190,7 +193,7 @@
 
 	my $pod_file;
 
-	my $mfile = (reverse @{ $info->{parts} })[0];
+	my $mfile = @{ $info->{parts} }[-1];
 	my $it    = File::Iterator->new(
 		DIR     => $info->{dir},
 		RECURSE => 1,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/pldcpan.pl?r1=1.29&r2=1.30&f=u




More information about the pld-cvs-commit mailing list