Skip Menu |
Report information
Id: 131371
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: mauke- <l.mai [at] web.de>
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: low
Type: docs
Perl Version: 5.24.1
Fixed In: (no value)



Subject: perldoc -f s doesn't find s///
From: l.mai [...] web.de
To: perlbug [...] perl.org
Date: Fri, 26 May 2017 09:51:07 +0200
Download (untitled) / with headers
text/plain 3.2k
This is a bug report for perl from l.mai@web.de, generated with the help of perlbug 1.40 running under perl 5.24.1. ----------------------------------------------------------------- [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. [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
To: Perl 5 Porters <perl5-porters [...] perl.org>
From: Ævar Arnfjörð Bjarmason <avarab [...] gmail.com>
Date: Fri, 26 May 2017 11:23:24 +0200
CC: bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #131371] perldoc -f s doesn't find s///
Download (untitled) / with headers
text/plain 3.9k
On Fri, May 26, 2017 at 9:56 AM, l.mai@web.de <perlbug-followup@perl.org> wrote: Show quoted text
> ----------------------------------------------------------------- > [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 0909e3f8ef8e05f1d7a64f033b3e0aaa67a55cd9 (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. Show quoted text
> [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 >
Date: Fri, 26 May 2017 11:30:10 +0200
To: perl5-porters [...] perl.org
From: Lukas Mai <plokinom [...] gmail.com>
Subject: Re: [perl #131371] perldoc -f s doesn't find s///
Download (untitled) / with headers
text/plain 1.7k
Am 26.05.2017 um 11:23 schrieb Ævar Arnfjörð Bjarmason: Show quoted text
> 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 0909e3f8ef8e05f1d7a64f033b3e0aaa67a55cd9 > (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>
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.9k
On Fri, 26 May 2017 02:31:00 -0700, plokinom@gmail.com wrote: Show quoted text
> 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 0909e3f8ef8e05f1d7a64f033b3e0aaa67a55cd9 > > (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 7a66ad52515a09c8957c88804fdb4a961ba15df4.
RT-Send-CC: perl5-porters [...] perl.org
Thanks, closing this ticket -- Karl Williamson
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 150b
On Thu, 01 Jun 2017 08:18:13 -0700, khw wrote: Show quoted text
> Thanks, closing this ticket
Applied as 0a31ee11c8f69d509334d0813d833cddacf9dacb -- Karl Williamson
Download (untitled) / with headers
text/plain 317b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org