Chris,<br><br>Revision of Net::DNS?<br><br>I do not understand why a zone transfer would fail in the way you describe.<br><br>Are you using Net::DNS::ZoneFile to read your zone data from disk?<br><br>There should be no need to hack RR.pm.<br>
Your script needs to handle the exception condition.<br><br> my $zone = new Net::DNS::ZoneFile( $filename );<br> <br> loop { # through RRs in zone file<br><br> my $rr = eval { $zone->read; }; # which knows about multi-line RRs<br>
if ( $@ ) {<br> warn $@;<br> next;<br> }<br><br> last unless $rr;<br><br> # process RR<br><br> }<br><br><br>Regards<br><br clear="all"><div><div dir="ltr">Dick Franks<br>
<br>--<br></div></div>
<br><br><div class="gmail_quote">On 22 May 2013 20:30, Chris Buxton <span dir="ltr"><<a href="mailto:clists@buxtonfamily.us" target="_blank">clists@buxtonfamily.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a script that reads zones from files on disk and also via zone transfer. Currently, when reading in data, if the script encounters a record for which Net::DNS does not implement a record type class, the script dies. The immediate case looks like this:<br>
<br>
WKS not implemented at /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int/Net/DNS/RR.pm line 630.<br>
new Net:NS::RR( ... ) at ./<a href="http://dnsdiff.pl" target="_blank">dnsdiff.pl</a> line 300<br>
<br>
Short of hacking Net::DNS::RR, how can I handle this without dying and without losing any records coming after the unknown record type in a zone transfer?<br>
<br>
Regards,<br>
Chris Buxton<br>
_______________________________________________<br>
net-dns-users mailing list<br>
<a href="mailto:net-dns-users@nlnetlabs.nl">net-dns-users@nlnetlabs.nl</a><br>
<a href="https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users" target="_blank">https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users</a><br>
</blockquote></div><br>