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

perldoc -f s doesn't find s/// #15989

Closed
p5pRT opened this issue May 26, 2017 · 10 comments
Closed

perldoc -f s doesn't find s/// #15989

p5pRT opened this issue May 26, 2017 · 10 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented May 26, 2017

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

Searchable as RT131371$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 26, 2017

From @mauke

Created by @mauke

$ perldoc -f s
No documentation for perl function 's' found

... unlike m, qr, tr, which are all found.

I think this is because perldoc searches perlop for X<$operator>, i.e. X<m>,
X<qr>, X<tr>, etc. but unlike those, the entry for s/// doesn't contain X<s>​:

=item C<s/I<PATTERN>/I<REPLACEMENT>/msixpodualngcer>
X<substitute> X<substitution> X<replace> X<regexp, replace>

X<s> should be added to this line.

Perl Info

Flags:
    category=docs
    severity=low

Site configuration information for perl 5.24.1:

Configured by mauke at Sun Feb 19 23:06:44 CET 2017.

Summary of my perl5 (revision 5 version 24 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=4.9.6-1-arch, archname=i686-linux
    uname='linux simplicio 4.9.6-1-arch #1 smp preempt thu jan 26 09:41:20 cet 2017 i686 gnulinux '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -flto',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion='', gccversion='6.3.1 20170109', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3
    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-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/i686-pc-linux-gnu/6.3.1/include-fixed /usr/lib /lib
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -flto -L/usr/local/lib -fstack-protector-strong'



@INC for perl 5.24.1:
    /home/mauke/usr/lib/perl5/site_perl/5.24.1/i686-linux
    /home/mauke/usr/lib/perl5/site_perl/5.24.1
    /home/mauke/usr/lib/perl5/5.24.1/i686-linux
    /home/mauke/usr/lib/perl5/5.24.1


Environment for perl 5.24.1:
    HOME=/home/mauke
    LANG=en_US.UTF-8
    LANGUAGE=en_US
    LC_COLLATE=C
    LC_MONETARY=de_DE.UTF-8
    LC_TIME=de_DE.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/mauke/perl5/perlbrew/bin:/home/mauke/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    PERLBREW_BASHRC_VERSION=0.73
    PERLBREW_HOME=/home/mauke/.perlbrew
    PERLBREW_ROOT=/home/mauke/perl5/perlbrew
    PERL_BADLANG (unset)
    PERL_UNICODE=SAL
    SHELL=/bin/bash

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 26, 2017

From @avar

On Fri, May 26, 2017 at 9​:56 AM, l.mai@​web.de <perlbug-followup@​perl.org> wrote​:

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

$ perldoc -f s
No documentation for perl function 's' found

... unlike m, qr, tr, which are all found.

I think this is because perldoc searches perlop for X<$operator>, i.e. X<m>,
X<qr>, X<tr>, etc. but unlike those, the entry for s/// doesn't contain X<s>​:

=item C<s/I<PATTERN>/I<REPLACEMENT>/msixpodualngcer>
X<substitute> X<substitution> X<replace> X<regexp, replace>

X<s> should be added to this line.

This is a regression in v5.16. On my 5.14 install​:

  $ perldoc -f s
  s/// The substitution operator. See "Regexp Quote-Like Operators" in
  perlop.

The first bad commit is 0909e3f
(Upgrade Pod-Perldoc to CPAN version 3.15_15).

If you run with "-f s -l" you'll see that we're now finding 2 files,
and perldoc responds by saying it found nothing.

I haven't tested your proposed patch (looks like it needs a "make
install" to test), but I suspect it'll fail due to the above reason,
i.e. we'll still find 2 things, and thus fail.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=docs
severity=low
---
Site configuration information for perl 5.24.1​:

Configured by mauke at Sun Feb 19 23​:06​:44 CET 2017.

Summary of my perl5 (revision 5 version 24 subversion 1) configuration​:

Platform​:
osname=linux, osvers=4.9.6-1-arch, archname=i686-linux
uname='linux simplicio 4.9.6-1-arch #1 smp preempt thu jan 26 09​:41​:20 cet 2017 i686 gnulinux '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -flto',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion='', gccversion='6.3.1 20170109', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3
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-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/i686-pc-linux-gnu/6.3.1/include-fixed /usr/lib /lib
libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.24.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.24'
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -flto -L/usr/local/lib -fstack-protector-strong'

---
@​INC for perl 5.24.1​:
/home/mauke/usr/lib/perl5/site_perl/5.24.1/i686-linux
/home/mauke/usr/lib/perl5/site_perl/5.24.1
/home/mauke/usr/lib/perl5/5.24.1/i686-linux
/home/mauke/usr/lib/perl5/5.24.1

---
Environment for perl 5.24.1​:
HOME=/home/mauke
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/mauke/perl5/perlbrew/bin​:/home/mauke/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/bin​:/usr/bin/site_perl​:/usr/bin/vendor_perl​:/usr/bin/core_perl
PERLBREW_BASHRC_VERSION=0.73
PERLBREW_HOME=/home/mauke/.perlbrew
PERLBREW_ROOT=/home/mauke/perl5/perlbrew
PERL_BADLANG (unset)
PERL_UNICODE=SAL
SHELL=/bin/bash

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 26, 2017

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

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 26, 2017

From @mauke

Am 26.05.2017 um 11​:23 schrieb Ævar Arnfjörð Bjarmason​:

On Fri, May 26, 2017 at 9​:56 AM, l.mai@​web.de <perlbug-followup@​perl.org> wrote​:

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

$ perldoc -f s
No documentation for perl function 's' found

... unlike m, qr, tr, which are all found.

I think this is because perldoc searches perlop for X<$operator>, i.e. X<m>,
X<qr>, X<tr>, etc. but unlike those, the entry for s/// doesn't contain X<s>​:

=item C<s/I<PATTERN>/I<REPLACEMENT>/msixpodualngcer>
X<substitute> X<substitution> X<replace> X<regexp, replace>

X<s> should be added to this line.

This is a regression in v5.16. On my 5.14 install​:

 $ perldoc \-f s
     s///    The substitution operator\. See "Regexp Quote\-Like Operators" in
             perlop\.

The first bad commit is 0909e3f
(Upgrade Pod-Perldoc to CPAN version 3.15_15).

If you run with "-f s -l" you'll see that we're now finding 2 files,
and perldoc responds by saying it found nothing.

I haven't tested your proposed patch (looks like it needs a "make
install" to test), but I suspect it'll fail due to the above reason,
i.e. we'll still find 2 things, and thus fail.

No, what you're seeing in 5.14 is the perlfunc entry for s///, which
still exists. At some point perldoc switched to searching perlop for
qr/m/tr/s, but the new logic doesn't work with s (due to the missing
X<>). I tested it by manually editing `perldoc -lm perlpod` and it works
(mostly - there's another bug in perldoc that makes it display
"Quote-Like Operators" at the end of the entry, but showing one extra
line is better than showing nothing).

--
Lukas Mai <plokinom@​gmail.com>

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 26, 2017

From @mauke

On Fri, 26 May 2017 02​:31​:00 -0700, plokinom@​gmail.com wrote​:

Am 26.05.2017 um 11​:23 schrieb Ævar Arnfjörð Bjarmason​:

On Fri, May 26, 2017 at 9​:56 AM, l.mai@​web.de <perlbug-
followup@​perl.org> wrote​:

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

$ perldoc -f s
No documentation for perl function 's' found

... unlike m, qr, tr, which are all found.

I think this is because perldoc searches perlop for X<$operator>,
i.e. X<m>,
X<qr>, X<tr>, etc. but unlike those, the entry for s/// doesn't
contain X<s>​:

=item C<s/I<PATTERN>/I<REPLACEMENT>/msixpodualngcer>
X<substitute> X<substitution> X<replace> X<regexp, replace>

X<s> should be added to this line.

This is a regression in v5.16. On my 5.14 install​:

$ perldoc -f s
s/// The substitution operator. See "Regexp Quote-Like
Operators" in
perlop.

The first bad commit is 0909e3f
(Upgrade Pod-Perldoc to CPAN version 3.15_15).

If you run with "-f s -l" you'll see that we're now finding 2 files,
and perldoc responds by saying it found nothing.

I haven't tested your proposed patch (looks like it needs a "make
install" to test), but I suspect it'll fail due to the above reason,
i.e. we'll still find 2 things, and thus fail.

No, what you're seeing in 5.14 is the perlfunc entry for s///, which
still exists. At some point perldoc switched to searching perlop for
qr/m/tr/s, but the new logic doesn't work with s (due to the missing
X<>). I tested it by manually editing `perldoc -lm perlpod` and it
works
(mostly - there's another bug in perldoc that makes it display
"Quote-Like Operators" at the end of the entry, but showing one extra
line is better than showing nothing).

Patch pushed to blead-next as 7a66ad5.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 1, 2017

From @khwilliamson

Thanks, closing this ticket
--
Karl Williamson

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 1, 2017

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 1, 2017

From @khwilliamson

On Thu, 01 Jun 2017 08​:18​:13 -0700, khw wrote​:

Thanks, closing this ticket

Applied as 0a31ee1

--
Karl Williamson

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 23, 2018

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release yesterday of Perl 5.28.0, this and 185 other issues have been
resolved.

Perl 5.28.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.28.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 23, 2018

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.