From: Graham Knop Date: Mon, 16 May 2016 21:45:39 +0000 (-0400) Subject: provide default license url if possible X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a12a101a830dd8b4b850b0295817a35d0381a612;p=p5sagit%2FDistar.git provide default license url if possible --- diff --git a/lib/Distar.pm b/lib/Distar.pm index e6bd5bb..afe458a 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -135,6 +135,17 @@ sub _clone { }; }; + { + my $license = $meta->{license} = [ + map { $_ eq 'perl' ? 'perl_5' : $_ } + map { ref ? @$_ : $_ } + ( $meta->{license} || $self->{LICENSE} || 'perl_5' ) + ]; + + $resources->{license} ||= [ 'http://dev.perl.org/licenses/' ] + if @$license == 1 && $license->[0] eq 'perl_5'; + } + %$meta; }