Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output of perldoc -f tr is truncated #13060

Closed
p5pRT opened this issue Jun 25, 2013 · 9 comments
Closed

Output of perldoc -f tr is truncated #13060

p5pRT opened this issue Jun 25, 2013 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 25, 2013

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

Searchable as RT118633$

@p5pRT
Copy link
Author

p5pRT commented Jun 25, 2013

From @pjscott

Created by @pjscott

% perldoc -f tr
  Quote and Quote-like Operators
[...]
  tr/SEARCHLIST/REPLACEMENTLIST/cdsr
%

It should have kept going and displayed the documentation for tr|y. It
stopped because it reached the =item line for y/// in this extract from
perlop.pod​:

=item tr/SEARCHLIST/REPLACEMENTLIST/cdsr
X<tr> X<y> X<transliterate> X</c> X</d> X</s>

=item y/SEARCHLIST/REPLACEMENTLIST/cdsr

Not sure what the best fix would be here.

Perl Info

Flags:
     category=core
     severity=low

Site configuration information for perl 5.19.2:

Configured by peter at Fri Jun 21 17:31:03 PDT 2013.

Summary of my perl5 (revision 5 version 19 subversion 2) configuration:
   Commit id: 0e05e560edc12120d297a77996d0dfa53a9858af
   Platform:
     osname=linux, osvers=2.6.27.41-170.2.117.fc10.i686, archname=i686-linux
     uname='linux tweety.homeip.net 2.6.27.41-170.2.117.fc10.i686 #1 smp 
thu dec 10 11:00:29 est 2009 i686 i686 i386 gnulinux '
     config_args='-des -Dusedevel'
     hint=recommended, useposix=true, d_sigaction=define
     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='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     optimize='-O2',
     cppflags='-fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include'
     ccversion='', gccversion='4.3.2 20081105 (Red Hat 4.3.2-7)', 
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='cc', ldflags =' -fstack-protector -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=/lib/libc-2.9.so, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.9'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib 
-fstack-protector'

Locally applied patches:



@INC for perl 5.19.2:
     lib
     /usr/local/lib/perl5/site_perl/5.19.2/i686-linux
     /usr/local/lib/perl5/site_perl/5.19.2
     /usr/local/lib/perl5/5.19.2/i686-linux
     /usr/local/lib/perl5/5.19.2
     /usr/local/lib/perl5/site_perl
     .


Environment for perl 5.19.2:
     HOME=/home/peter
     LANG=C
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
PATH=/home/peter/perl5/perlbrew/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/peter/bin:.:/home/peter/bin:.
     PERLBREW_CSHRC_VERSION=0.33
     PERLBREW_HOME=/home/peter/.perlbrew
     PERLBREW_PATH=/home/peter/perl5/perlbrew/bin
     PERLBREW_PERL=
     PERLBREW_ROOT=/home/peter/perl5/perlbrew
     PERLBREW_VERSION=0.33
     PERL_BADLANG (unset)
     SHELL=/bin/tcsh


@p5pRT
Copy link
Author

p5pRT commented Jun 28, 2013

From @jkeenan

On Tue Jun 25 07​:20​:21 2013, Peter@​PSDT.com wrote​:

This is a bug report for perl from peter@​psdt.com,
generated with the help of perlbug 1.39 running under perl 5.19.2.

-----------------------------------------------------------------
[Please describe your issue here]

% perldoc -f tr
Quote and Quote-like Operators
[...]
tr/SEARCHLIST/REPLACEMENTLIST/cdsr
%

It should have kept going and displayed the documentation for tr|y. It
stopped because it reached the =item line for y/// in this extract
from
perlop.pod​:

=item tr/SEARCHLIST/REPLACEMENTLIST/cdsr
X<tr> X<y> X<transliterate> X</c> X</d> X</s>

=item y/SEARCHLIST/REPLACEMENTLIST/cdsr

Not sure what the best fix would be here.

1. Bug confirmed.

2. I suspect it's a problem with 'perldoc -f' -- but *not* the problem
which underlies RT #118615. (The patch that Shlomi submitted for
118615, which works for me, does not work for me for this problem.)

3. As was the case with #118615, since Pod-Perldoc is primarily
maintained on CPAN, I am going to close this ticket here and open up a
ticket at https://rt.cpan.org//Dist/Display.html?Queue=Pod-Perldoc.
See​: https://rt.cpan.org/Ticket/Display.html?id=86506

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Jun 28, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 28, 2013

@jkeenan - Status changed from 'open' to 'rejected'

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2013

From @pjscott

On Thu, 27 Jun 2013 17​:38​:03 -0700, James E Keenan via RT wrote​:

On Tue Jun 25 07​:20​:21 2013, Peter@​PSDT.com wrote​:

It should have kept going and displayed the documentation for tr|y. It
stopped because it reached the =item line for y/// in this extract from
perlop.pod​:

=item tr/SEARCHLIST/REPLACEMENTLIST/cdsr X<tr> X<y> X<transliterate>
X</c> X</d> X</s>

=item y/SEARCHLIST/REPLACEMENTLIST/cdsr

1. Bug confirmed.

2. I suspect it's a problem with 'perldoc -f' -- but *not* the problem
which underlies RT #118615. (The patch that Shlomi submitted for
118615, which works for me, does not work for me for this problem.)

3. As was the case with #118615, since Pod-Perldoc is primarily
maintained on CPAN, I am going to close this ticket here and open up a
ticket at https://rt.cpan.org//Dist/Display.html?Queue=Pod-Perldoc. See​:
https://rt.cpan.org/Ticket/Display.html?id=86506

I demur. It seems at least as likely to me that the fix lies in
rewriting perlop.pod, which is why I tagged it for core documentation.
For instance, if the order of the source lines in perlop.pod were changed
to​:

=item tr/SEARCHLIST/REPLACEMENTLIST/cdsr

=item y/SEARCHLIST/REPLACEMENTLIST/cdsr

X<tr> X<y> X<transliterate> X</c> X</d> X</s>

then perldoc -f tr and perldoc -f y both produce what appears to be the
expected output.

--
Peter Scott

@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2013

From @rjbs

I would like to see this fixed. Let's not worry for just this moment whether that means in core or
not.

If I make the update you suggest, I get different output for `perldoc -f tr` and `perldoc -f y`.

tr's docs show most of "Quote and Quote-like Operators"

y's shows just the section for y///

Did you make any other change, or did I make a mistake here or did I misread you?

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2013

From @pjscott

On 7/6/13 9​:23 AM, Ricardo SIGNES via RT wrote​:

I would like to see this fixed. Let's not worry for just this moment whether that means in core or
not.

If I make the update you suggest, I get different output for `perldoc -f tr` and `perldoc -f y`.

tr's docs show most of "Quote and Quote-like Operators"

y's shows just the section for y///

Did you make any other change, or did I make a mistake here or did I misread you?

Sorry about that RJBS, there is another necessary change, assuming that
the intention is to display the "Quote and Quote-like Operators" preamble​:

--- /usr/local/lib/perl5/5.16.2/pod/perlop.pod.orig 2013-06-30
18​:50​:45.000000000 -0700
+++ /usr/local/lib/perl5/5.16.2/pod/perlop.pod 2013-07-06
17​:33​:53.000000000 -0700
@​@​ -1271,7 +1271,7 @​@​

  =head2 Quote and Quote-like Operators
  X<operator, quote> X<operator, quote-like> X<q> X<qq> X<qx> X<qw> X<m>
-X<qr> X<s> X<tr> X<'> X<''> X<"> X<""> X<//> X<`> X<``> X<<< << >>>
+X<qr> X<s> X<tr> X<y> X<'> X<''> X<"> X<""> X<//> X<`> X<``> X<<< << >>>
  X<escape sequence> X<escape>

  While we usually think of quotes as literal values, in Perl they

The fly in the ointment is that now both of them only display the
heading for y/// and neither one shows the heading for tr///.

Unless we introduce new syntax/semantics, the only solution to *that* I
see is merging headings into the ugly combination line​:

=item tr/SEARCHLIST/REPLACEMENTLIST/cdsr OR
y/SEARCHLIST/REPLACEMENTLIST/cdsr

Even if search_perlop in Pod​::Perldoc were changed to have the 'related'
functionality that search_perlfunc has, that wouldn't help because
perldoc -f tr would look for a line matching /^=item\s+tr\b/ to consider
equivalent, and it will see =item y/// as starting a new section.

This is the only instance of two functions/operators with different
spellings requiring the same pod section. The ugly combination line may
still be the best alternative for this rather small problem.

Thanks for taking your time on this. See you in a couple of weeks.

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2014

From @rjbs

This seems to be sorted out in the latest Pod​::Perldoc, now in blead and on CPAN. (No thanks to me, don't get me wrong! ;))
--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Mar 28, 2014

@jmdh - Status changed from 'rejected' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant