In buildtoc, eliminate nl() by adding an explicit "\n" at its two use points.
authorNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 13:36:05 +0000 (13:36 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 21 Jan 2011 13:36:05 +0000 (13:36 +0000)
pod/buildtoc

index 44f924c..4b9d9e6 100644 (file)
@@ -437,13 +437,13 @@ sub podset {
            unhead2();
            output "=over 4\n\n" unless $inhead1;
            $inhead1 = 1;
-           output $_; nl(); next;
+           output "$_\n"; next;
        }
        if (s/^=head2 (.*)/=item $1/) {
            unitem();
            output "=over 4\n\n" unless $inhead2;
            $inhead2 = 1;
-           output $_; nl(); next;
+           output "$_\n"; next;
        }
        if (s/^=item ([^=].*)/$1/) {
            next if $pod eq 'perldiag';
@@ -489,10 +489,6 @@ sub unitem {
     $initem = 0;
 }
 
-sub nl {
-    output "\n";
-}
-
 my $NEWLINE = 0;       # how many newlines have we seen recently
 my $LINE;              # what remains to be printed