Changeset 2334
- Timestamp:
- 01/30/20 22:55:33 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildnet.pm
r2333 r2334 13 13 use Net::IPv4Addr; 14 14 use Net::IPv6Addr; 15 use URI ;15 use URI::_punycode qw(encode_punycode decode_punycode); 16 16 17 17 =head1 NAME … … 513 513 $dbzone .= sprintf( 514 514 "%-30s IN %-4s %s\n", 515 URI->new("http://$res")->host,515 encode_punycode($res), 516 516 ($ip =~ /:/ ? 'AAAA' : 'A'), 517 517 $ip … … 522 522 $dbzone .= sprintf( 523 523 "%-30s IN %-4s %s\n", 524 URI->new("http://$_")->host,524 encode_punycode($_), 525 525 ($ip =~ /:/ ? 'AAAA' : 'A'), 526 526 $ip … … 540 540 $dbzone .= "; $msg\n"; 541 541 } else { 542 $dbzone .= sprintf("%-30s IN CNAME %s\n", URI->new("http://$_")->host, URI->new("http://$res")->host,);542 $dbzone .= sprintf("%-30s IN CNAME %s\n", encode_punycode($_), encode_punycode($res)); 543 543 } 544 544 } … … 548 548 $dbzone .= sprintf( 549 549 "%-30s IN SSHFP %s\n", 550 URI->new("http://$name")->host,550 encode_punycode($name), 551 551 $sshfp, 552 552 ); … … 563 563 564 564 my $domain = $ozone->get_attributes('domain') || ''; 565 my $punyDomain = URI->new("http://$domain")->host;565 my $punyDomain = encode_punycode($domain); 566 566 my $dbzone = ''; 567 567 if ($ozone->get_attributes('net')) { … … 633 633 $dbzone .= sprintf($fmt, $revip, 634 634 $reverse =~ /\.$/ 635 ? ( URI->new("http://$reverse")->host, ($punyDomain ? "$punyDomain." : '.'))636 : ( URI->new("http://$reverse")->host, '.'));635 ? (encode_punycode($reverse), ($punyDomain ? "$punyDomain." : '.')) 636 : (encode_punycode($reverse), '.')); 637 637 } 638 638 }
Note: See TracChangeset
for help on using the changeset viewer.