X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fpod2man.PL;h=6821d84334e8ee76a2e030991755f8e3c0ee6ef2;hb=a9bc755754f0db5e848e65dfd2e63a96af50ffd4;hp=68121e482c615d797121c7bdecf90a5738c756a8;hpb=5f05dabc4054964aa3b10f44f8468547f051cdf8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 68121e4..6821d84 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -608,11 +608,22 @@ END $indent = 0; +$begun = ""; + while (<>) { if ($cutting) { next unless /^=/; $cutting = 0; } + if ($begun) { + if (/^=end\s+$begun/) { + $begun = ""; + } + elsif ($begun =~ /^(roff|man)$/) { + print STDOUT $_; + } + next; + } chomp; # Translate verbatim paragraph @@ -637,6 +648,22 @@ while (<>) { $verbatim = 0; + if (/^=for\s+(\S+)\s*/s) { + if ($1 eq "man" or $1 eq "roff") { + print STDOUT $',"\n\n"; + } else { + # ignore unknown for + } + next; + } + elsif (/^=begin\s+(\S+)\s*/s) { + $begun = $1; + if ($1 eq "man" or $1 eq "roff") { + print STDOUT $'."\n\n"; + } + next; + } + # check for things that'll hosed our noremap scheme; affects $_ init_noremap();