Bug#250877: perl: [patch] pod2man: should escape minus in verbatim text
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. Hope this patch is good enough, Achim $ diff -u /usr/share/perl/5.8.4/Pod/Man.pm Pod/Man.pm --- /usr/share/perl/5.8.4/Pod/Man.pm2005-02-02 15:31:49.0 +0100 +++ Pod/Man.pm 2005-02-25 10:46:36.0 +0100 @@ -64,6 +64,8 @@ .if n .sp .. .de Vb \ Begin verbatim text +. if '\*[.T]'utf8' \ +.char - \N'45' .ft @CFONT@ .nf .ne \\$1 -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.10-1-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages perl depends on: ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii libdb4.24.2.52-18Berkeley v4.2 Database Libraries [ ii libgdbm31.8.3-2 GNU dbm database routines (runtime ii perl-base 5.8.4-6 The Pathologically Eclectic Rubbis ii perl-modules5.8.4-6 Core Perl modules -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#250877: perl: [patch] pod2man: should escape minus in verbatim text
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. Cheers, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#250877: perl: [patch] pod2man: should escape minus in verbatim text
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.pm2005-02-02 15:31:49.0 +0100 +++ Pod/Man.pm 2005-02-25 12:07:14.0 +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]