Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Mar 19, 2025

podcheck.t uses a crude heuristic to identify links that use the wrong POD syntax (e.g. C<Some::Module> instead of L<Some::Module>): It checks whether the word before the C<...> markup was "see". This has the potential for a lot of false positives, so it adds an additional check: If the words before "see" include the word "you", we don't count it as a link attempt. This is to rule out cases like you may see C<mtfnpy> in the output.

However, that heuristic failed on this example from perlport:

on Unix you'll see C<"a.">

This is because ' is not a word character, so the leading context was just "ll", which doesn't contain "you":

not ok 241 - POD of pod/perlport.pod
#   "? Should you be using L<...> instead of"
#     C<"a."> near line 1104 of pod/perlport.pod

This patch teaches podcheck.t about common English short forms such as "you'll", "you're", or "you'd".


  • This set of changes does not require a perldelta entry.

podcheck.t uses a crude heuristic to identify links that use the wrong
POD syntax (e.g. C<Some::Module> instead of L<Some::Module>): It checks
whether the word before the C<...> markup was "see". This has the
potential for a lot of false positives, so it adds an additional check:
If the words before "see" include the word "you", we don't count it as a
link attempt. This is to rule out cases like "you may see C<mtfnpy> in
the output".

However, that heuristic failed on this example from perlport:

    on Unix you'll see C<"a.">

This is because ' is not a word character, so the leading context was
just "ll", which doesn't contain "you":

    not ok 241 - POD of pod/perlport.pod
    #   "? Should you be using L<...> instead of"
    #     C<"a."> near line 1104 of pod/perlport.pod

This patch teaches podcheck.t about common English short forms such as
"you'll", "you're", or "you'd".
@mauke mauke merged commit 3c6cd8b into Perl:blead Mar 19, 2025
34 checks passed
@mauke mauke deleted the podcheck-accept-apostrophe branch March 19, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants