On Friday 25 February 2005 11:54, Colin Watson wrote:
> On Fri, Feb 25, 2005 at 11:20:22AM +0100, Achim Bohnet wrote:
> > Package: perl
> > Version: 5.8.4-6
> > Followup-For: Bug #250877
> > 
> > Hi,
> > just stumbled over this bug too.  I don't know nroff but I tried to
> > apply to Pod::Man the suggestion given in groff-base README.Debian file
> > (cc Colin Watson) in the hope that VB scopes the char directive.  Visual
> > inspection of manpages created with the patch confirm my hope. Minus in
> > verbatim are now minus and when a word is broken to next line a hyphen
> > is used.
> 
> I think "-" in the source text will still have the wrong hyphenation
> semantics even with this patch. It would be better to make pod2man spit
> out "\-" explicitly, if possible.

Right, even simpler.  Diff context set to 10 for easier inspection:

--- /usr/share/perl/5.8.4/Pod/Man.pm    2005-02-02 15:31:49.000000000 +0100
+++ Pod/Man.pm  2005-02-25 12:07:14.000000000 +0100
@@ -510,20 +510,21 @@
 # wrap in .Vb/.Ve.
 sub verbatim {
     my $self = shift;
     return if $$self{EXCLUDE};
     local $_ = shift;
     return if /^\s+$/;
     s/\s+$/\n/;
     my $lines = tr/\n/\n/;
     1 while s/^(.*?)(\t+)/$1 . ' ' x (length ($2) * 8 - length ($1) % 8)/me;
     s/\\/\\e/g;
+    s/-/\\-/g;
     s/^(\s*\S)/'\&' . $1/gme;
     $self->makespace;
     $self->output (".Vb $lines\n$_.Ve\n");
     $$self{NEEDSPACE} = 1;
 }

 # Called for a regular text block.  Gets the paragraph, the line number, and a
 # Pod::Paragraph object.  Perform interpolation and output the results.
 sub textblock {
     my $self = shift;

Achim

> Cheers,
> 
> -- 
> Colin Watson                                       [EMAIL PROTECTED]
> 
> 

-- 
  To me vi is Zen.  To use vi is to practice zen. Every command is
  a koan. Profound to the user, unintelligible to the uninitiated.
  You discover truth everytime you use it.
                                      -- [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to