Skip to content

Commit

Permalink
Merge pull request #653 from metacpan/haarg/download-numified-version
Browse files Browse the repository at this point in the history
use numified versions for exact version checks in download_url
  • Loading branch information
mickeyn committed May 17, 2017
2 parents 8891d68 + 442012a commit 415adf6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/MetaCPAN/Document/File/Set.pm
Expand Up @@ -318,7 +318,15 @@ sub _version_filters {
return () unless $version;

if ( $version =~ s/^==\s*// ) {
return +{ must => [ { term => { 'module.version' => $version } } ] };
return +{
must => [
{
term => {
'module.version_numified' => $self->_numify($version)
}
}
]
};
}
elsif ( $version =~ /^[<>!]=?\s*/ ) {
my %ops = qw(< lt <= lte > gt >= gte);
Expand Down

0 comments on commit 415adf6

Please sign in to comment.