Subject: | TXT record parsing |
in order to correctly parse TXT records, (that begin without a $valid_name)
EXAMPLE:
TXT "v=spf1 a mx -all"
i had to make the following change:
--- ZoneParse.pm.orig Wed Aug 18 04:59:07 2004
+++ ZoneParse.pm Wed Aug 18 05:06:48 2004
@@ -245,7 +245,7 @@
push @{$dns_ptr{$self}},
_massage({ name => $1, class => $3, ttl => $2, host => $4 });
}
- elsif (/($valid_name) \s+ $ttl_cls TXT \s+ \"([^\"]*)\"/ix)
+ elsif (/($valid_name)? \s* $ttl_cls TXT \s+ \"([^\"]*)\"/ix)
{
push @{$dns_txt{$self}},
_massage({ name => $1, ttl => $2, class => $3, text=> $4});
cheers,
rayc
cpan id: rayslinky