Subject: | Undefined subroutine &Net::LibIDN::idn_to_ascii called at /usr/local/lib/perl/5.14.2/Net/DNS/Domain.pm line 282. |
The following script throws an error about Net::LibIDN
mhorsfall@darmstadtium:~$ cat test.pl
#!/usr/bin/perl
use strict;
use warnings;
use Net::DNS;
my $res = Net::DNS::Resolver->new();
my $upd = Net::DNS::Update->new("break.com");
$upd->push("update", rr_add("break.com. IN A 254.254.254.254"));
my $resp = $res->send($upd->data);
__END__
mhorsfall@darmstadtium:~$ ./test.pl
Undefined subroutine &Net::LibIDN::idn_to_ascii called at
/usr/local/lib/perl/5.14.2/Net/DNS/Domain.pm line 282.
I believe this is because _encode_ascii (which is calling it) checks
UTF8 instead of checking LIBIDN:
sub _encode_ascii {
return Net::LibIDN::idn_to_ascii( shift, 'utf-8' ) || croak
'invalid name'
if UTF8 && $_[0] =~ /[^\000-\177]/;
--
Matthew Horsfall (alh)
http://dyn.com