From: Graham Knop Date: Mon, 16 May 2016 21:45:01 +0000 (-0400) Subject: add rt as bugtracker to metadata if none specified X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d2016bf9539031627c359066e6d6760944019dc;p=p5sagit%2FDistar.git add rt as bugtracker to metadata if none specified --- diff --git a/lib/Distar.pm b/lib/Distar.pm index edf5045..e6bd5bb 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -126,6 +126,15 @@ sub _clone { @$no_index_dir = grep !$seen{$_}++, @$no_index_dir, grep -d, qw(t xt); } + $resources->{bugtracker} ||= do { + (my $queue = $meta->{name} || $self->{NAME}) =~ s/::/-/g; + my $rt_link = 'https://rt.cpan.org/Dist/Display.html?Name='.$queue; + $spec_ver < 2 ? $rt_link : { + web => $rt_link, + mailto => "bug-$queue\@rt.cpan.org", + }; + }; + %$meta; }