diff options
| author | Francois Perrad <fperrad@gmail.com> | 2017-06-14 16:15:30 +0200 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-06-15 22:31:50 +0200 |
| commit | e27c0b5acbac221df4ad6a1476aa1bcd1509f274 (patch) | |
| tree | 6fccac8327e84d60c332cd7b06ee9cc01ffbbb41 /support/scripts/scancpan | |
| parent | 8710996bb7d69bd4fbbf59cd3c186a428334c187 (diff) | |
| download | buildroot-e27c0b5acbac221df4ad6a1476aa1bcd1509f274.tar.gz buildroot-e27c0b5acbac221df4ad6a1476aa1bcd1509f274.zip | |
scancpan: refactor with MetaCPAN::API source()
instead of get_manifest()
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts/scancpan')
| -rwxr-xr-x | support/scripts/scancpan | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/support/scripts/scancpan b/support/scripts/scancpan index f87cdce7af..82c77a8575 100755 --- a/support/scripts/scancpan +++ b/support/scripts/scancpan @@ -536,13 +536,6 @@ sub get_checksum { return $chksum->{$basename}, $basename; } -sub get_manifest { - my ($author, $distname, $version) = @_; - my $url = qq{http://fastapi.metacpan.org/source/${author}/${distname}-${version}/MANIFEST}; - my $response = $ua->get($url); - return $response->{content}; -} - sub is_xs { my ($manifest) = @_; # This heuristic determines if a module is a native extension, by searching @@ -572,7 +565,9 @@ sub fetch { say qq{fetch ${name}} unless $quiet; my $result = $mcpan->release( distribution => $name ); $dist{$name} = $result; - my $manifest = get_manifest( $result->{author}, $name, $result->{version} ); + my $manifest = $mcpan->source( author => $result->{author}, + release => $name . q{-} . $result->{version}, + path => 'MANIFEST' ); $need_dlopen{$name} = is_xs( $manifest ); $license_files{$name} = find_license_files( $manifest ); my %build = (); |

