Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
rootrdap
Commits
136abf57
Unverified
Commit
136abf57
authored
Jul 20, 2018
by
Gavin Brown
Browse files
use a single JSON object, include rdap conformance
parent
fade57cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
rootrdap.pl
View file @
136abf57
...
...
@@ -33,6 +33,8 @@ if (!-e $dir || !-d $dir) {
my
$ua
=
LWP::
UserAgent
->
new
('
agent
'
=>
sprintf
('
%s/%s
',
basename
(
__FILE__
,
'
.pl
'),
$VERSION
));
my
$json
=
JSON
->
new
->
pretty
;
my
$list
=
join
('
/
',
$dir
,
basename
(
TLD_LIST
));
if
(
!-
e
$list
||
stat
(
$list
)
->
mtime
<=
time
()
-
86400
)
{
...
...
@@ -108,6 +110,7 @@ foreach my $tld (@tlds) {
'
ldhName
'
=>
$tld
,
'
handle
'
=>
$tld
,
'
port43
'
=>
WHOIS_HOST
,
'
rdapConformance
'
=>
[
'
rdap_level_0
'
],
};
#
...
...
@@ -314,7 +317,6 @@ foreach my $tld (@tlds) {
# write RDAP object to disk
#
my
$jfile
=
sprintf
('
%s/%s.json
',
$dir
,
$tld
);
my
$json
=
JSON
->
new
->
pretty
;
if
(
!
write_file
(
$jfile
,
$json
->
encode
(
$data
)))
{
printf
(
STDERR
"
Unable to write to '%s': %s
\n
",
$jfile
,
$!
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment