--- Net-DNS-0.48/lib/Net/DNS/RR.pm 2004-08-12 06:48:00.000000000 +0100 +++ SC-Net-DNS-0.48/lib/Net/DNS/RR.pm 2004-12-13 15:56:19.583003131 +0000 @@ -250,9 +250,6 @@ build_regex() unless $RR_REGEX; - # strip out comments - $rrstring =~ s/;.*//g; - ($rrstring =~ m/$RR_REGEX/xso) || confess qq|qInternal Error: "$rrstring" did not match RR pat.\nPlease report this to the author!\n|; @@ -265,8 +262,20 @@ my $rdata = $5 || ''; $rdata =~ s/\s+$// if $rdata; - $name =~ s/\.$// if $name; + # strip out comments + if($rrtype eq 'TXT') { + if(($rdata)=~m[;]) { + if(($rdata)=~m[^(".*")($|\s*;)]) { + $rdata = $1; + } else { + ($rdata)=~s/;.*//g; + } + } + } else { + ($rdata)=~s/;.*//g; + } + $name =~ s/\.$// if $name; # RFC3597 tweaks # This converts to known class and type if specified as TYPE###