From: Graham Knop Date: Mon, 16 May 2016 21:42:51 +0000 (-0400) Subject: no_index t and xt if not specified X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3584e66bd8076c11c8aee76a69c5886618e33180;p=p5sagit%2FDistar.git no_index t and xt if not specified --- diff --git a/lib/Distar.pm b/lib/Distar.pm index 50943b7..edf5045 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -120,6 +120,12 @@ sub _clone { my $spec_ver = ($meta->{'meta-spec'} && $meta->{'meta-spec'}{version} || 1.4; my $resources = $meta->{resources} ||= {}; + { + my $no_index_dir = ${ $meta->{no_index}||={} }{directory} ||= []; + my %seen; + @$no_index_dir = grep !$seen{$_}++, @$no_index_dir, grep -d, qw(t xt); + } + %$meta; }