Index: trunk/DNSDB.pm
===================================================================
--- trunk/DNSDB.pm	(revision 768)
+++ trunk/DNSDB.pm	(revision 772)
@@ -6502,12 +6502,12 @@
     print $datafile "Z$zone:$primary:$email"."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n"
       or die $!;
-
-  } elsif ($typemap{$type} eq 'A') {
-
+  } # SOA
+
+  elsif ($typemap{$type} eq 'A') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
     print $datafile "+$host:$val:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'NS') {
-
+  } # A
+
+  elsif ($typemap{$type} eq 'NS') {
     if ($revrec eq 'y') {
       $val = NetAddr::IP->new($val);
@@ -6535,7 +6535,7 @@
       print $datafile "\&$host"."::$val:$ttl:$stamp:$loc\n" or die $!;
     }
-
-  } elsif ($typemap{$type} eq 'AAAA') {
-
+  } # NS
+
+  elsif ($typemap{$type} eq 'AAAA') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
     my $altgrp = 0;
@@ -6559,12 +6559,12 @@
     }
     print $datafile "$prefix:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'MX') {
-
+  } # AAAA
+
+  elsif ($typemap{$type} eq 'MX') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
     print $datafile "\@$host"."::$val:$dist:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'TXT') {
-
+  } # MX
+
+  elsif ($typemap{$type} eq 'TXT') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
 # le sigh.  Some idiot DNS implementations don't seem to like tinydns autosplitting
@@ -6610,11 +6610,12 @@
 #:3600
 
-  } elsif ($typemap{$type} eq 'CNAME') {
-
+  } # TXT
+
+  elsif ($typemap{$type} eq 'CNAME') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
     print $datafile "C$host:$val:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'SRV') {
-
+  } # CNAME
+
+  elsif ($typemap{$type} eq 'SRV') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
 
@@ -6629,7 +6630,7 @@
     }
     print $datafile "$prefix\\000:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'RP') {
-
+  } # SRV
+
+  elsif ($typemap{$type} eq 'RP') {
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
     # RP consists of two mostly free-form strings.
@@ -6646,7 +6647,7 @@
     }
     print $datafile "$prefix\\000:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($typemap{$type} eq 'PTR') {
-
+  } # RP
+
+  elsif ($typemap{$type} eq 'PTR') {
     $$recflags{$val}++;
     if ($revrec eq 'y') {
@@ -6677,12 +6678,12 @@
       print $datafile "^$host:$val:$ttl:$stamp:$loc\n" or die $!;
     }
-
-  } elsif ($type == 65280) { # A+PTR
-
+  } # PTR
+
+  elsif ($type == 65280) { # A+PTR
     $$recflags{$val}++;
     print $datafile "=$host:$val:$ttl:$stamp:$loc\n" or die $!;
-
-  } elsif ($type == 65281) { # AAAA+PTR
-
+  } # A+PTR
+
+  elsif ($type == 65281) { # AAAA+PTR
     $$recflags{$val}++;
     # treat these as two separate records.  since tinydns doesn't have
@@ -6697,7 +6698,7 @@
 ##fixme: add a config flag to indicate use of the patch from http://www.fefe.de/dns/
 # type 6 is for AAAA+PTR, type 3 is for AAAA
-
-  } elsif ($type == 65282) { # PTR template
-
+  } # AAAA+PTR
+
+  elsif ($type == 65282) { # PTR template
     # only useful for v4 with standard DNS software, since this expands all
     # IPs in $zone (or possibly $val?) with autogenerated records
@@ -6712,7 +6713,7 @@
       $self->__publish_subnet($val, $recflags, $host, $datafile, $ttl, $stamp, $loc, $zone, 1);
     }
-
-  } elsif ($type == 65283) { # A+PTR template
-
+  } # PTR template
+
+  elsif ($type == 65283) { # A+PTR template
     $val = NetAddr::IP->new($val);
     # Just In Case.  An A+PTR should be impossible to add to a v6 revzone via API.
@@ -6726,11 +6727,13 @@
       $self->__publish_subnet($val, $recflags, $host, $datafile, $ttl, $stamp, $loc, $zone, 0);
     }
-
-  } elsif ($type == 65284) { # AAAA+PTR template
+  } # A+PTR template
+
+  elsif ($type == 65284) { # AAAA+PTR template
     # Stub for completeness.  Could be exported to DNS software that supports
     # some degree of internal automagic in generic-record-creation
     # (eg http://search.cpan.org/dist/AllKnowingDNS/ )
-
-  } elsif ($type == 65285) { # Delegation
+  } # AAAA+PTR template
+
+  elsif ($type == 65285) { # Delegation
     # This is intended for reverse zones, but may prove useful in forward zones.
 
@@ -6757,6 +6760,7 @@
       }
     }
-
-  } elsif ($type == 65300) { # ALIAS
+  } # Delegation
+
+  elsif ($type == 65300) { # ALIAS
     # Implemented as a unique record in parallel with many other
     # management tools, for clarity VS formal behviour around CNAME
@@ -6788,4 +6792,5 @@
       print $datafile "+$host:$subip:$attl:$stamp:$loc\n" or die $!;
     }
+  } # ALIAS
 
 ##
@@ -6793,6 +6798,5 @@
 ##
 
-  } elsif ($type == 44) { # SSHFP
-
+  elsif ($type == 44) { # SSHFP
     ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
 
@@ -6806,5 +6810,7 @@
     print $datafile "$rec:$ttl:$stamp:$loc\n" or die $!;
 
-  } else {
+  } # SSHFP
+
+  else {
     # raw record.  we don't know what's in here, so we ASS-U-ME the user has
     # put it in correctly, since either the user is messing directly with the
@@ -6817,5 +6823,5 @@
     #print $datafile ":$host:$type:$val:$ttl:$stamp:$loc\n";
 
-  } # record type if-else
+  } # "other"
 
 } # end _printrec_tiny()
