BGPmon-CPM-Prefix-Finder-1

 view release on metacpan or  search on metacpan

lib/BGPmon/CPM/Prefix/Finder.pm  view on Meta::CPAN

Input: source and netname
Output: array of prefixes

=cut
sub netname2prefixes{
  my $source = shift;
  my $netname = shift;

  my $ua = LWP::UserAgent->new;
  my $res = $ua->get("http://apps.db.ripe.net/whois/grs-search?" .
                     "&type-filter=inetnum&type-filter=inet6num" .
                     "&source=$source-grs&query-string=$netname" .
                     "&flags=Cr",'Accept'=>'application/json');
  my $res_struct = decode_json($res->content);
  print Dumper($res_struct);
}

=head2 orghandle2nets

Input: orghandle
Output: array of nets

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 3.881 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-b63e86051f13 )