From b3d2b1d00a938fa282929c073f4a63dfe56ec413 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 13:06:25 +0100 Subject: [PATCH] download_url end point should query releases for "perl" --- lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm index f52e3b92d..1b16ab609 100644 --- a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm +++ b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm @@ -13,7 +13,7 @@ has '+type' => ( default => 'file' ); sub get : Local : Path('/download_url') : Args(1) { my ( $self, $c, $module ) = @_; - my $type = 'module'; + my $type = $module eq 'perl' ? 'dist' : 'module'; my $data = $self->model($c) ->find_download_url( $type, $module, $c->req->params );