From: Hans Mulder Date: Sun, 15 Jun 1997 11:26:49 +0000 (+1200) Subject: [BUG:47:LOG] Dropped "and" in pod2man X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d3b0638f4c2cf44af3831abe68fc08048b89bc2;p=p5sagit%2Fp5-mst-13.2.git [BUG:47:LOG] Dropped "and" in pod2man Nathan Torkington wrote: > perlfunc.pod contains: > For a yet-more-powerful import facility, see L and > L. > when pod2man | nroff -man has its way with this, it comes out as: > For a yet-more-powerful import facility, see the > use entry elsewhere in this document the perlmod > manpage. > That is, the "and" is dropped. I've verified this with the pod2man > that comes with 5.004_01, but I couldn't produce a simple test case in > 30 seconds. This is about as simple as I could produce in 50 seconds: =head1 NAME foo - bar =head1 DESCRIPTION L and bar This seems to help: p5p-msgid: 9707082355.AA13254@ icgned.icgned.nl private-msgid: 9707082355.AA13254@icgned.icgned.nl --- diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 2c1837a..5ca0854 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -1101,6 +1101,7 @@ sub clear_noremap { sub internal_lrefs { local($_) = shift; + local $trailing_and = s/and\s+$// ? "and " : ""; s{L]+)>}{$1}g; my(@items) = split( /(?:,?\s+(?:and\s+)?)/ ); @@ -1114,6 +1115,7 @@ sub internal_lrefs { $retstr .= " entr" . ( @items > 1 ? "ies" : "y" ) . " elsewhere in this document "; # terminal space to avoid words running together (pattern used strips terminal spaces) + $retstr .= $trailing_and; return $retstr;