Skip to content

Conversation

@khwilliamson
Copy link
Contributor

Certain functions have forms that contain the suffix '_nocontext', and which have long been specially handled in embed.h. autodoc was unaware of these until 14c379e recently.

This tweaks the wording added in that commit, and by changing to use an in-line marker where its desired in the pod instead of an arbitrary place dictated from above, makes the result flow better.

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

autodoc.pl Outdated
Comment on lines 1779 to 1784
while ($pod =~ / ( __PLAIN_vs_NOCONTEXT_wording__ \( (\w+) \) ) /x) {
my $entire = $1;
my $this = $2;
$this = $PLAIN_vs_NOCONTEXT_wording =~ s/WHICH/$this/gr;
$pod =~ s/\Q$entire/$this/;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why loop and match (and re-match) manually?

Suggested change
while ($pod =~ / ( __PLAIN_vs_NOCONTEXT_wording__ \( (\w+) \) ) /x) {
my $entire = $1;
my $this = $2;
$this = $PLAIN_vs_NOCONTEXT_wording =~ s/WHICH/$this/gr;
$pod =~ s/\Q$entire/$this/;
}
$pod =~ s{ \b __PLAIN_vs_NOCONTEXT_wording__ \( (\w+) \) }{
my $this = $1;
$PLAIN_vs_NOCONTEXT_wording =~ s/WHICH/$this/gr
}xeg;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done

Certain functions have forms that contain the suffix '_nocontext', and
which have long been specially handled in embed.h.  autodoc was unaware
of these until 14c379e recently.

This tweaks the wording added in that commit, and by changing to use an
in-line marker where its desired in the pod instead of an arbitrary
place dictated from above, makes the result flow better.
@khwilliamson khwilliamson merged commit 658039d into Perl:blead Sep 24, 2025
33 checks passed
@khwilliamson khwilliamson deleted the autodoc_nocontext branch September 25, 2025 02:36
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.

3 participants