Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bug in _prepare_version_query

  • Loading branch information...
commit 1b8cde1db5e29301097e4f4ada9ace8d71269781 1 parent 608d86e
@semuel authored
Showing with 6 additions and 2 deletions.
  1. +1 −0  lib/Dist/Surveyor.pm
  2. +5 −2 lib/Dist/Surveyor/Inquiry.pm
View
1  lib/Dist/Surveyor.pm
@@ -68,6 +68,7 @@ $search_dirs is an array-ref containing the list of directories to survey.
sub determine_installed_releases {
my ($options, $search_dirs) = @_;
+ $options->{opt_perlver} ||= version->parse( $] )->numify;
my %installed_mod_info;
View
7 lib/Dist/Surveyor/Inquiry.pm
@@ -8,6 +8,7 @@ use Dist::Surveyor::DB_File; # internal
use LWP::UserAgent;
use JSON;
use Scalar::Util qw(looks_like_number); # core
+use Data::Dumper;
=head1 NAME
@@ -154,6 +155,7 @@ is a hashref containing release information and file information:
sub get_candidate_cpan_dist_releases {
my ($module, $version, $file_size) = @_;
+ my $funcstr = "get_candidate_cpan_dist_releases($module, $version, $file_size)";
my $version_qual = _prepare_version_query(0, $version);
@@ -179,13 +181,14 @@ sub get_candidate_cpan_dist_releases {
file.module.version_numified date stat.mtime distribution file.path
)]
};
+
my $response = $ua->post(
'http://api.metacpan.org/v0/file',
Content_Type => 'application/json',
Content => to_json( $query, { canonical => 1 } ),
);
die $response->status_line unless $response->is_success;
- return _process_response("get_candidate_cpan_dist_releases($module, $version, $file_size)", $response);
+ return _process_response($funcstr, $response);
}
=head2 get_candidate_cpan_dist_releases_fallback($module, $version)
@@ -234,7 +237,7 @@ sub get_candidate_cpan_dist_releases_fallback {
}
sub _prepare_version_query {
- my ($is_fallback, $version) = shift;
+ my ($is_fallback, $version) = @_;
$version = 0 if not defined $version; # XXX
my ($v_key, $num_key) =
$is_fallback
Please sign in to comment.
Something went wrong with that request. Please try again.