Created
August 7, 2016 05:37
-
-
Save mickeyn/a7bfa30cf4bbd68244ed5cee18c22e52 to your computer and use it in GitHub Desktop.
find filename / meta.yml version mismatches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use MetaCPAN::Client; | |
my $mcpan = MetaCPAN::Client->new( version => 'v1' ); | |
my $releases = $mcpan->all('releases', { | |
es_filter => { | |
terms => { status => [qw< latest >] } | |
}, | |
fields => [qw< author version download_url distribution >], | |
}); | |
while ( my $r = $releases->next ) { | |
next unless $r->download_url; # another issue | |
my $ver = $r->version =~ s/^v//r; | |
my $url = $r->download_url; | |
unless ( $url =~ /$ver(?:-TRIAL)?\.(?:tar|tgz|zip)/ ) { | |
printf "%s:%s:%s:%s\n", $r->author, $r->distribution, $ver, $url; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment