Changeset 2388


Ignore:
Timestamp:
06/08/20 19:15:11 (4 years ago)
Author:
nanardon
Message:

use Net::IDN::Encode instead URI internal functions

Location:
trunk/LATMOS-Accounts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/Makefile.PL

    r2289 r2388  
    4141        'Text::CSV' => undef, 
    4242        'DateTime::Format::Pg' => undef, 
     43        'Net::IDN::Encode' => undef, 
    4344    }, # e.g., Module::Name => 1.1 
    4445    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005 
  • trunk/LATMOS-Accounts/latmos-accounts.spec.in

    r2289 r2388  
    4545BuildRequires: perl(Pod::Xhtml) 
    4646Buildrequires: perl(DateTime::Format::Pg) 
     47BuildRequires: perl(Net::IDN::Encode) 
    4748 
    4849Requires: perl(Mail::Sendmail) 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildnet.pm

    r2337 r2388  
    1414use Net::IPv6Addr; 
    1515use URI; # Ensure module is required 
    16 use URI::_idna; 
     16use Net::IDN::Encode ':all'; 
    1717 
    1818=head1 NAME 
     
    514514                $dbzone .= sprintf( 
    515515                    "%-30s IN    %-4s     %s\n", 
    516                     URI::_idna::encode($res), 
     516                    domain_to_ascii($res), 
    517517                    ($ip =~ /:/ ? 'AAAA' : 'A'), 
    518518                    $ip 
     
    523523                    $dbzone .= sprintf( 
    524524                        "%-30s IN    %-4s     %s\n", 
    525                         URI::_idna::encode($_), 
     525                        domain_to_ascii($_), 
    526526                        ($ip =~ /:/ ? 'AAAA' : 'A'), 
    527527                        $ip 
     
    541541                    $dbzone .= "; $msg\n"; 
    542542                } else { 
    543                     $dbzone .= sprintf("%-30s IN    CNAME    %s\n", URI::_idna::encode($_), URI::_idna::encode($res)); 
     543                    $dbzone .= sprintf("%-30s IN    CNAME    %s\n", domain_to_ascii($_), domain_to_ascii($res)); 
    544544                } 
    545545            } 
     
    549549                    $dbzone .= sprintf( 
    550550                        "%-30s IN    SSHFP    %s\n", 
    551                         URI::_idna::encode($name), 
     551                        domain_to_ascii($name), 
    552552                        $sshfp, 
    553553                    ); 
     
    564564 
    565565    my $domain = $ozone->get_attributes('domain') || ''; 
    566     my $punyDomain = URI::_idna::encode($domain); 
     566    my $punyDomain = domain_to_ascii($domain); 
    567567    my $dbzone = ''; 
    568568    if ($ozone->get_attributes('net')) { 
     
    634634            $dbzone .= sprintf($fmt, $revip, 
    635635                $reverse =~ /\.$/ 
    636                     ? (URI::_idna::encode($reverse), ($punyDomain ? "$punyDomain." : '.')) 
    637                     : (URI::_idna::encode($reverse), '.')); 
     636                    ? (domain_to_ascii($reverse), ($punyDomain ? "$punyDomain." : '.')) 
     637                    : (domain_to_ascii($reverse), '.')); 
    638638        } 
    639639    } 
Note: See TracChangeset for help on using the changeset viewer.