Bug 1739463 - perldoc -f '<>' complains about pod errors
Summary: perldoc -f '<>' complains about pod errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Pod-Perldoc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-09 11:27 UTC by Vadim Raskhozhev
Modified: 2019-09-06 12:58 UTC (History)
11 users (show)

Fixed In Version: perl-Pod-Perldoc-3.28.01-441.fc31 perl-Pod-Perldoc-3.28.01-420.fc30 perl-Pod-Perldoc-3.28.01-419.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-06 12:31:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CPAN 126015 0 None None None 2019-08-13 12:19:00 UTC

Description Vadim Raskhozhev 2019-08-09 11:27:39 UTC
Description of problem: the output of `perldoc -f '<>'` is garbled with pod errors at the end [1]. Also, there's more text than probably should be [2].

Version-Release number of selected component (if applicable): perl-interpreter-5.28.2-438.fc30.x86_64 (also see [2])

How reproducible: always


Steps to Reproduce:
1. perldoc -f '<>'
2. scroll to the end

Actual results: see below

[1]
POD ERRORS
    Hey! The above document had some coding errors, which are explained
    below:

    Around line 259:
        You forgot a '=back' before '=head2'

    Around line 482:
        =back without =over

[2]
Besides pod errors, there's some extra text beginning with "Constant Folding" and ending with

    Here is a short, but incomplete summary:

      Math::String           treat string sequences like numbers
      Math::FixedPrecision   calculate with a fixed precision
      Math::Currency         for currency calculations
      Bit::Vector            manipulate bit vectors fast (uses C)
      Math::BigIntFast       Bit::Vector wrapper for big numbers
      Math::Pari             provides access to the Pari C library
      Math::Cephes           uses the external Cephes C library (no
                             big numbers)
      Math::Cephes::Fraction fractions via the Cephes library
      Math::GMP              another one using an external C library
      Math::GMPz             an alternative interface to libgmp's big ints
      Math::GMPq             an interface to libgmp's fraction numbers
      Math::GMPf             an interface to libgmp's floating point numbers

    Choose wisely.

after the actual contents of the requested perldoc section. Also there's no section header at the beginning. The similar issue exists on Windows with Strawberry Perl 5.30.0.1 (hence it's highly likely an upstream bug). On CentOS 7 with perl-5.16.3-292.el7.x86_64 `perldoc -f '<>'` displays what it should without any errors.

Comment 1 Petr Pisar 2019-08-13 08:16:03 UTC
I confirm both the issues.

-f option searches in perlfunc and perlop. perlop contains a X<< <> >> index entry for =head2 I/O Operators section:


=head2 I/O Operators
X<operator, i/o> X<operator, io> X<io> X<while> X<filehandle>
X<< <> >> X<< <<>> >> X<@ARGV>

There are several I/O operators you should know about.
[...]
If an angle-bracket-based globbing expression is used as the condition of
a C<while> or C<for> loop, then it will be implicitly assigned to C<$_>.
If either a globbing expression or an explicit assignment of a globbing
expression to a scalar is used as a C<while>/C<for> condition, then
the condition actually tests for definedness of the expression's value,
not for its regular truth value.

=head2 Constant Folding


This text from "=head2 Constant Folding" line, including, should not be printed. This can be debugged with "perldoc -D -T -u -f '<>' 2>&1 |less" command.

Comment 2 Petr Pisar 2019-08-13 12:09:37 UTC
Both issues are triggered by this commit in Pod-Perldoc:

commit d8b23dcb1a7fd6cbd0f97e980c72ef2b75b76141 (refs/bisect/bad)
Author: Mark Allen <mrallen1>
Date:   Tue Jan 14 00:09:36 2014 -0600

    Refactor search_perlop RT#86506
    
    Couldn't figure out how the old code was supposed to work against 5.18
    so I refactored it.  It seems to work for the common "function-like"
    operators such as q, qq, qx, qr, tr, m, y

I will reported it to the upstream.

Comment 3 Petr Pisar 2019-08-15 13:00:19 UTC
I developed a fix and posted it to the upstream. I've also applied it to Fedora 32. If nobody complains, I will apply it to the older Fedoras later.

Comment 4 Petr Pisar 2019-08-22 08:09:21 UTC
No response in a week. I will assume I did not broke anything and going to apply it Fedora 30 and 29.

Comment 5 Fedora Update System 2019-08-22 08:30:31 UTC
FEDORA-2019-56744fc88a has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-56744fc88a

Comment 6 Fedora Update System 2019-08-22 08:34:30 UTC
FEDORA-2019-e8002fd7bf has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e8002fd7bf

Comment 7 Fedora Update System 2019-08-23 02:32:58 UTC
perl-Pod-Perldoc-3.28.01-420.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-56744fc88a

Comment 8 Fedora Update System 2019-08-23 04:29:18 UTC
perl-Pod-Perldoc-3.28.01-419.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-e8002fd7bf

Comment 9 Fedora Update System 2019-09-06 12:31:11 UTC
perl-Pod-Perldoc-3.28.01-420.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2019-09-06 12:58:06 UTC
perl-Pod-Perldoc-3.28.01-419.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.