Ticket #186: pod2ipf137.diff

File pod2ipf137.diff, 3.4 KB (added by Shmuel (Seymour J.) Metz, 6 years ago)

Modifications to pod2ipf.pl 1-37

  • H:\vendors\cpan\pod2ipf137.cmd

    old new sub process_index {  
    876876my $last_hl = 123;              # Very big
    877877sub output_preheader ($) {      # Fix head3 coming after head2; wrong for IPF
    878878  my $level = shift;            # Warning 121 ==> Warning 110
    879   print STDERR "     Jump in level: was $last_hl, now $level.\n"
    880     if $level > $last_hl + 1;
    881   while ($level > $last_hl + 1) {
    882     $last_hl++;                 # Same as tree nodes:
    883     print ":h$last_hl group=$groups{tree_nodes} x=left width=10% y=top height=10%.---fake-fix-level-node---\n:p.\n------------ Intentionally blank (missing level in the source POD) -----------\n"
     879  if (defined $last_hl) {
     880    print STDERR "     Jump in level: was $last_hl, now $level.\n"
     881      if $level > $last_hl + 1;
     882    while ($level > $last_hl + 1) {
     883      $last_hl++;                 # Same as tree nodes:
     884      print ":h$last_hl group=$groups{tree_nodes} x=left width=10% y=top height=10%.---fake-fix-level-node---\n:p.\n------------ Intentionally blank (missing level in the source POD) -----------\n"
     885    }
    884886  }
    885887  $last_hl = $level;
    886888}
    sub output_file {  
    898900
    899901  $fname = $ftitle . '.pod';
    900902  if (not -f "./$fname") {      # Protect 'B::C.pod' from accessing B drive
    901     $fname = $modnamehash{$ftitle};
     903#   $fname = $modnamehash{$ftitle};
     904    unless ($fname = $modnamehash{$ftitle}) {print STDERR "!!! $ftitle not found\n"; return};
    902905  }
    903906  $page = $ftitle;
    904907  $toc = substr $maxtoc, -1, 1;
    BEGIN {  
    20002003         "aacute"        =>     "aa", #   small a, acute accent
    20012004         "Acirc"         =>     "ac", #   capital A, circumflex accent
    20022005         "acirc"         =>     "ac", #   small a, circumflex accent
    2003          "AElig"         =>     'Aelig', #   capital AE diphthong (ligature)
     2006         "AElig"         =>     'AElig', #   capital AE diphthong (ligature)
    20042007         "aelig"         =>     'aelig', #   small ae diphthong (ligature)
    20052008         "Agrave"        =>     "ag", #   capital A, grave accent
    20062009         "agrave"        =>     "ag", #   small a, grave accent
    sub intern_modnamehash {  
    22682271                  $used_name = $name_from_pod;
    22692272                  # dumpValue(\%alternative_name);
    22702273                } else {
    2271                   print STDERR "\n!!! Not matching: `$_' vs. `$name_from_pod'\n"
     2274#                 print STDERR "\n!!! Not matching: `$_' vs. `$name_from_pod'\n"
     2275                  print STDERR "\n!!! Not matching: `$_' vs. `$name_from_pod' in $shortpath $longname\n"
    22722276                    unless /perlfaq/;
    22732277                }
    22742278                $seen_from_pod{$name_from_pod}++;
    sub intern_modnamehash {  
    22992303                }
    23002304                $skip_sections{"$used_name/NAME"}++ if $skipNAME;
    23012305              } else {
    2302                 print STDERR "\n!!! $_: bad NAME: `$theline'\n";
     2306#               print STDERR "\n!!! $_: bad NAME: `$theline'\n";
     2307                print STDERR "\n!!! $_: bad NAME: `$theline' in $shortpath $longname\n";
    23032308              }
    23042309            } elsif ($good) {
    2305               print STDERR "\n!!! $_: no NAME\n";
     2310#             print STDERR "\n!!! $_: no NAME\n";
     2311              print STDERR "\n!!! $_: no NAME in $shortpath $longname\n";
    23062312            }
    23072313            add_file($used_name, $longname) if $good;
    23082314        }