Unverified Commit ad0fcdea authored by Gavin Brown's avatar Gavin Brown
Browse files

fixed

parent fabfb5e2
......@@ -157,12 +157,17 @@ foreach my $id (sort({ $a <=> $b } uniq(keys(%{$iana}), keys(%{$internic})))) {
#
# write RDAP object to disk
#
my $jfile = sprintf('%s/%d.json', $data->{'handle'}, $id);
my $jfile = sprintf('%s/%d.json', $dir, $data->{'handle'});
my $file = IO::File->new;
$file->open($jfile, '>:utf8');
$file->print($json->encode($data));
$file->close;
if (!$file->open($jfile, '>:utf8')) {
printf(STDERR "Cannot write to '%s': %s\n", $jfile, $!);
exit(1);
} else {
$file->print($json->encode($data));
$file->close;
}
}
print STDERR "done\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment