Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.86k stars 528 forks source link

pod2man screws up $" in perlvar #5547

Closed p5pRT closed 21 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#9480 (status was 'resolved')

Searchable as RT9480$

p5pRT commented 22 years ago

From @nwc10

Created by @nwc10

pod2man misformats the entry for $" in perlvar.pod

  $LIST_SEPARATOR   $"" This is like "$\," except that it applies to array   and slice values interpolated into a double-quoted   string (or similar interpreted string). Default   is a space. (Mnemonic​: obvious\, I think.)

The output from pod2man looks like this​:

..IP "$LIST_SEPARATOR" 8 ..IX Item "$LIST_SEPARATOR" ..PD 0 ..IP "$""" 8 ..PD This is like \f(CW$\,\fR except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic​: obvious\, I think.)

pod2text gets it right​:

  $LIST_SEPARATOR   $" This is like $\, except that it applies to array and slice values   interpolated into a double-quoted string (or similar interpreted   string). Default is a space. (Mnemonic​: obvious\, I think.)

pod2html screws it up​:

\

\\$LIST_SEPARATOR\\\
\
\
\\$``\\\
\
\
This is like \\$\,\\ except that it applies to array and slice values

$` and $' are formatted correctly by all three.

I figure this is not a low severity bug because it's not just misformatting - the text as output is erroneous. I'm not sure if it should count as high\, because it's actually the subject of the paragraph which contains the error\, rather than some example code.

Perl Info ``` Flags: category=utilities severity=medium Site configuration information for perl v5.8.0: Configured by nick at Wed Jun 5 13:56:04 BST 2002. Summary of my perl5 (revision 5.0 version 8 subversion 0 patch 17004) configuration: Platform: osname=linux, osvers=2.4.7-10, archname=i686-linux uname='linux localhost.localdomain 2.4.7-10 #1 thu sep 6 17:27:27 edt 2001 i686 unknown ' config_args='-de -Dcc=ccache /usr/local/bin/gcc -Dld=gcc -Dusedevel -Ubincompat5005 -Doptimize=-Os -Uinstallusrbinperl -Dcf_email=nick@ccl4.org -Dperladmin=nick@ccl4.org -Dinc_version_list= -Dinc_version_list_init=0 -Dinstallman1dir=none -Dinstallman3dir=none' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='ccache /usr/local/bin/gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-Os', cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.1', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: DEVEL16967 @INC for perl v5.8.0: /usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl . Environment for perl v5.8.0: HOME=/home/nick LANG=en_GB.ISO-8859-1 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/nick/bin:/home/nick/bin:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/sbin:/usr/sbin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

Nicholas Clark \nick@​ccl4\.org writes​:

pod2man misformats the entry for $" in perlvar.pod

   $LIST\_SEPARATOR
   $""     This is like "$\," except that it applies to array
           and slice values interpolated into a double\-quoted
           string \(or similar interpreted string\)\.  Default
           is a space\.  \(Mnemonic​: obvious\, I think\.\)

The output from pod2man looks like this​:

.IP "$LIST_SEPARATOR" 8 .IX Item "$LIST_SEPARATOR" .PD 0 .IP "$""" 8 .PD This is like \f(CW$\,\fR except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic​: obvious\, I think.)

This nroff looks correct to me\, and both Solaris nroff and GNU groff 1.17.2 renders this with only a single quote in the formatted output. (Escaping of double-quotes in nroff is a black art\, but the above doubles the contained quote\, which is supposed to be the right thing to do.)

I see you're on Linux; what version of groff are you using?

-- Russ Allbery (rra@​stanford.edu) \<http​://www.eyrie.org/~eagle/>

p5pRT commented 22 years ago

From @nwc10

On Fri\, Jun 07\, 2002 at 12​:27​:34PM -0700\, Russ Allbery wrote​:

Nicholas Clark \nick@&#8203;ccl4\.org writes​:

pod2man misformats the entry for $" in perlvar.pod

   $LIST\_SEPARATOR
   $""     This is like "$\," except that it applies to array
           and slice values interpolated into a double\-quoted
           string \(or similar interpreted string\)\.  Default
           is a space\.  \(Mnemonic&#8203;: obvious\, I think\.\)

The output from pod2man looks like this​:

.IP "$LIST_SEPARATOR" 8 .IX Item "$LIST_SEPARATOR" .PD 0 .IP "$""" 8 .PD This is like \f(CW$\,\fR except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic​: obvious\, I think.)

This nroff looks correct to me\, and both Solaris nroff and GNU groff 1.17.2 renders this with only a single quote in the formatted output. (Escaping of double-quotes in nroff is a black art\, but the above doubles the contained quote\, which is supposed to be the right thing to do.)

I see you're on Linux; what version of groff are you using?

Offhand I don't know\, as the machine is my desktop at work\, and I'm not there until Monday. (bah. Monday. No bank holidays next week) It's Redhat 7.2\, if that helps someone else answer it [As it's Redhat\, have they shipped some dodgy development groff to add to their gcc crimes?]

Nicholas Clark -- Even better than the real thing​: http​://nms-cgi.sourceforge.net/

p5pRT commented 21 years ago

From @abigail

On Fri\, Jun 07\, 2002 at 09​:33​:34PM +0100\, Nicholas Clark wrote​:

On Fri\, Jun 07\, 2002 at 12​:27​:34PM -0700\, Russ Allbery wrote​:

Nicholas Clark \nick@&#8203;ccl4\.org writes​:

pod2man misformats the entry for $" in perlvar.pod

   $LIST\_SEPARATOR
   $""     This is like "$\," except that it applies to array
           and slice values interpolated into a double\-quoted
           string \(or similar interpreted string\)\.  Default 
           is a space\.  \(Mnemonic&#8203;: obvious\, I think\.\)   

The output from pod2man looks like this​:

.IP "$LIST_SEPARATOR" 8 .IX Item "$LIST_SEPARATOR" .PD 0 .IP "$""" 8 .PD This is like \f(CW$\,\fR except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic​: obvious\, I think.)

This nroff looks correct to me\, and both Solaris nroff and GNU groff 1.17.2 renders this with only a single quote in the formatted output. (Escaping of double-quotes in nroff is a black art\, but the above doubles the contained quote\, which is supposed to be the right thing to do.)

I see you're on Linux; what version of groff are you using?

Offhand I don't know\, as the machine is my desktop at work\, and I'm not there until Monday. (bah. Monday. No bank holidays next week) It's Redhat 7.2\, if that helps someone else answer it
[As it's Redhat\, have they shipped some dodgy development groff to add to their gcc crimes?]  
 
I do have the same problem as well\, using Linux\, on several distros of Linux\, with different versions of groff.

On a slackware distribution​:   $ groff --version   GNU groff version 1.17   Copyright (C) 1989-2001 Free Software Foundation\, Inc.   GNU groff comes with ABSOLUTELY NO WARRANTY.   You may redistribute copies of groff and its subprograms   under the terms of the GNU General Public License.   For more information about these matters\, see the file named COPYING.

  called subprograms​:

  GNU troff (groff) version 1.17   GNU grops (groff) version 1.17

On Rock linux​:   $ groff -v   GNU troff version 1.16.1

Unknown distro​:   $ groff --version   GNU groff version 1.17.2   Copyright (C) 1989-2001 Free Software Foundation\, Inc.   GNU groff comes with ABSOLUTELY NO WARRANTY.   You may redistribute copies of groff and its subprograms   under the terms of the GNU General Public License.   For more information about these matters\, see the file named COPYING.

  called subprograms​:

  GNU troff (groff) version 1.17.2   GNU grops (groff) version 1.17.2

Also on OpenBSD​:   $ groff -v   GNU troff version 1.15

 
 
Abigail

p5pRT commented 21 years ago

From [Unknown Contact. See original ticket]

Abigail \abigail@&#8203;foad\.org writes​:

On Fri\, Jun 07\, 2002 at 09​:33​:34PM +0100\, Nicholas Clark wrote​:

.IP "$LIST_SEPARATOR" 8 .IX Item "$LIST_SEPARATOR" .PD 0 .IP "$""" 8 .PD This is like \f(CW$\,\fR except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic​: obvious\, I think.)  
I do have the same problem as well\, using Linux\, on several distros of Linux\, with different versions of groff.

Are you seeing the problem with the above roff\, or with the final man page? If the latter\, could you try just the above in isolation\, or the following bit of POD?

  =head1 Test

  =over 4

  =item $"

  Blah.

  =back

I'm trying to track down where the problem might be\, since I can't reproduce it.

-- Russ Allbery (rra@​stanford.edu) \<http​://www.eyrie.org/~eagle/>

p5pRT commented 21 years ago

From @tamias

On Mon\, Jun 10\, 2002 at 02​:24​:46PM -0700\, Russ Allbery wrote​:

Are you seeing the problem with the above roff\, or with the final man page? If the latter\, could you try just the above in isolation\, or the following bit of POD?

=head1 Test

=over 4

=item $"

Blah\.

=back

I'm trying to track down where the problem might be\, since I can't reproduce it.

perldoc w/ perl5.005_03​:

Test   $""""   Blah.

perldoc w/ perl5.6.1​:

Test   $"" Blah.

perldoc w/ perl5.7.3​:

Test   $" Blah.

Ronald

p5pRT commented 21 years ago

From [Unknown Contact. See original ticket]

Ronald J Kimball \rjk@&#8203;linguist\.thayer\.dartmouth\.edu writes​:

perldoc w/ perl5.005_03​:

Test $"""" Blah.

perldoc w/ perl5.6.1​:

Test $"" Blah.

perldoc w/ perl5.7.3​:

Test $" Blah.

Yes... this is exactly what I'd expect\, since this *used* to be a bug\, and I fixed it in the latest version (which is in the release candidates and the 5.7.x testing releases). But I thought that bug report was from the latest version of Perl....

-- Russ Allbery (rra@​stanford.edu) \<http​://www.eyrie.org/~eagle/>

p5pRT commented 21 years ago

From @jhi

As far as I can tell this was definitely fixed for 5.8.0...?

p5pRT commented 21 years ago

@jhi - Status changed from 'open' to 'resolved'