Skip to content

Commit

Permalink
process full feed
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Dec 21, 2012
1 parent ad16d74 commit 1c53df8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions bin/dependencies.pl
Expand Up @@ -33,7 +33,7 @@

foreach my $name (sort keys %modules) {
next if $data->{modules}{$name} and not $opt{update}; #already collected
process_module('Pod::Escapes');
process_module($name);

#my $module = $mcpan->module( $name );
#my $dist = $mcpan->release( distribution => $module->{distribution} );
Expand Down Expand Up @@ -62,12 +62,16 @@ sub process_distro {
say STDERR "Processing distro $name";

try {
my $r = $mcpan->fetch( 'release/_search',
q => 'distribution:Test-Simple AND status:latest',
size => 1,
fields => 'distribution,dependency,version,dowload_url', # license,archive
);
$data->{distros}{$name} = $r->{hits}{hits}[0]{fields};
#my $r = $mcpan->fetch( 'release/_search',
# q => 'distribution:Test-Simple AND status:latest',
# size => 1,
# fields => 'distribution,dependency,version,dowload_url', # license,archive
#);
#$data->{distros}{$name} = $r->{hits}{hits}[0]{fields};
my $r = $mcpan->release( distribution => $name );
for my $field (qw(distribution dependency version dowload_url)) { # license,archive
$data->{distros}{$name}{$field} = $r->{$field};
}
} catch {
warn "Exception: $_";
};
Expand Down

0 comments on commit 1c53df8

Please sign in to comment.