Index: trunk/DNSDB/ExportBIND.pm
===================================================================
--- trunk/DNSDB/ExportBIND.pm	(revision 862)
+++ trunk/DNSDB/ExportBIND.pm	(revision 863)
@@ -322,5 +322,5 @@
       if ($val =~ /\.arpa$/) {
         # someone put in the formal .arpa name.  humor them.
-        print {$zonefiles->{$loc}} "^$val:$host:$ttl:$stamp:$loc\n" or die $!;
+        print {$zonefiles->{$loc}} "$val	$ttl	IN	PTR	$host\n" or die $!;
       } else {
         $zone = NetAddr::IP->new($zone);
@@ -328,12 +328,14 @@
           # sub-octet v4 zone
           ($val) = ($val =~ /\.(\d+)$/);
-          print {$zonefiles->{$loc}} "^$val.".DNSDB::_ZONE($zone, 'ZONE', 'r', '.').'.in-addr.arpa'.
-            ":$host:$ttl:$stamp:$loc\n" or die $!;
+          print {$zonefiles->{$loc}} "$val.".DNSDB::_ZONE($zone, 'ZONE', 'r', '.').'.in-addr.arpa'.
+		"	$ttl	IN	PTR	$host\n"
+		or die $!;
         } else {
           # not going to care about strange results if $val is not an IP value and is resolveable in DNS
           $val = NetAddr::IP->new($val);
-          print {$zonefiles->{$loc}} "^".
-            DNSDB::_ZONE($val, 'ZONE', 'r', '.').($val->{isv6} ? '.ip6.arpa' : '.in-addr.arpa').
-            ":$host:$ttl:$stamp:$loc\n" or die $!;
+          print {$zonefiles->{$loc}} DNSDB::_ZONE($val, 'ZONE', 'r', '.').($val->{isv6} ? '.ip6.arpa' : '.in-addr.arpa').
+		"	$ttl	IN	PTR	$host\n"
+		or die $!;
+
         }
       } # non-".arpa" $val
@@ -347,4 +349,22 @@
   } # PTR
 
+  elsif ($type == 65280) { # A+PTR
+    # Recurse to PTR or A as appropriate because BIND et al don't share
+    # the tinydns concept of merged forward/reverse records
+#    $$recflags{$val}++;
+    if ($revrec eq 'y') {
+      printrec_bind($zonefiles, $recid, $revrec, $loclist, $zone, $host, 12, $val, $distance, $weight, $port, $ttl,
+       $loc, $stamp, $expires, $stampactive);
+#print {$zonefiles->{$loc}} "=$host:$val:$ttl:$stamp:$loc\n" or die $!;
+#          printrec_bind(\%zonefiles, $recid, 'y', \@loclist, $revzone,
+#            $host, $type, $val, $dist, $weight, $port, $ttl, $loc, $stamp, $expires, $stampactive);
+#  my ($zonefiles, $recid, $revrec, $loclist, $zone, $host, $type, $val, $distance, $weight, $port, $ttl,
+#        $loc, $stamp, $expires, $stampactive) = @_;
+    } else {
+      printrec_bind($zonefiles, $recid, $revrec, $loclist, $zone, $host, 1, $val, $distance, $weight, $port, $ttl,
+       $loc, $stamp, $expires, $stampactive);
+    }
+  } # A+PTR
+
 } # printrec_bind()
 
