Skip to content

Let -f search perlop again #70

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Let -f search perlop again #70

wants to merge 6 commits into from

Conversation

briandfoy
Copy link
Owner

This is a rebased version of #43

…output

Please note that it bundles perlop POD from Perl 5.30.0 to have
a non-moving test target.

CPAN RT#86506
perlop documents many operators before "Regexp Quote-Like Operators"
(X<operator, regexp>) section. A change introduced with "Refactor
search_perlop RT#86506" (d8b23dc) commit started to ignore those
operators. E.g. A search for '==' did not found anything. A search for
'<>' returned too many text and broke POD syntax.

This patch searches for X<> index entries in all sections and
considers =head keywords in addition to =item as section delimeters.

Because some X<> entries exists on more places, this patch implements
this strategy: First =item section that contains the X<> entry is
returned. If there is no =item sections, last =head section is
returned. If the =item entry is empty (like for 'tr'), the the output
continues up to and including a next non-empty =item. This strategy is
implemented in one pass.
@briandfoy briandfoy self-assigned this Dec 9, 2023
@coveralls
Copy link

coveralls commented Dec 9, 2023

Pull Request Test Coverage Report for Build 7148468963

  • 0 of 36 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 7.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/Pod/Perldoc.pm 0 36 0.0%
Totals Coverage Status
Change from base Build 7147375445: -0.2%
Covered Lines: 102
Relevant Lines: 1346

💛 - Coveralls

@briandfoy briandfoy added Type: enhancement improve a feature that already exists Priority: low get to this whenever Type: testing Enhanced testing labels Dec 9, 2023
@briandfoy
Copy link
Owner Author

I need to fix up this patch for Windows. Some of the things to note for future work:

  • Windows line endings may be \r\n, so you have to allow for that in matchs.
  • However, the minimum version is now v5.10 because Pod::Man and podlators require v5.10. That means we can use \R.
  • IPC::Open3 hangs on Windows, so you have to do a non-blocking wiatpid. But, all that is in the new t/lib/TestUtils.pm
  • extracting from the sample perlop isn't working on Windows but I wonder if it's getting the right file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: low get to this whenever Type: enhancement improve a feature that already exists Type: testing Enhanced testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants