...
 
Commits (3)
Revision history for perl module Net::RDAP
0.12 - 2018-12-04
- remove colons from cache filenames to avoid
problems on Windows (RT#127684)
0.11 - 2018-20-29
- add MANIFEST, MYMETA.(json|yml) and this file
- minor documentation updates
......@@ -14,7 +14,7 @@ use Net::RDAP::SearchResult;
use vars qw($VERSION);
use strict;
$VERSION = 0.11;
$VERSION = 0.12;
=pod
......@@ -298,9 +298,8 @@ sub fetch {
$request->header('Authorization' => sprintf('Basic %s', encode_base64(join(':', ($args{'user'}, $args{'pass'}))))) if ($args{'user'} && $args{'pass'});
my $file = sprintf(
'%s/%s::cache::%s.json',
'%s/Net-RDAP-cache-%s.json',
($ENV{'TMPDIR'} || '/tmp'),
ref($self),
sha1_hex($url),
);
......
......@@ -118,7 +118,7 @@ sub ip {
# prefer the service with the longest prefix length
my @urls = @{$matches->{(sort { Net::IP->new($b)->prefixlen <=> Net::IP->new($a)->prefixlen } keys(%{$matches}))[0]}};
return $package->assemble_url($package->get_best_url(@urls), 'ip', $ip->prefix);
return $package->assemble_url($package->get_best_url(@urls), 'ip', split(/\//, $ip->prefix));
}
#
......@@ -278,6 +278,8 @@ sub load_registry {
my ($package, $url) = @_;
if (!defined($REGISTRY->{$url})) {
$package =~ s/:+/-/g;
my $file = sprintf('%s/%s-%s', File::Spec->tmpdir, $package, basename($url));
my ($mirror, $stat);
......