Skip to content

pod and comments: Note escape vs quote #23264

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 2 commits into
base: blead
Choose a base branch
from

Conversation

khwilliamson
Copy link
Contributor

Fixes #15221

The documentation and comments was misleading about conflating quoting a metacharacter and escaping it. Since \Q stands for quote, we have to continue to use that terminology. This commit clarifies that the two terms are often equivalent.

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

This adds a bit of text about metacharacters that was missing from this
introductory pod.
Fixes Perl#15221

The documentation and comments was misleading about conflating quoting a
metacharacter and escaping it.  Since \Q stands for quote, we have to
continue to use that terminology.  This commit clarifies that the two
terms are often equivalent.
want to match on, where "thing" means either a literal character, one
of the metacharacters listed above, or a group of characters or
metacharacters in parentheses.
Note that in the above, C<$> doesn't mean a dollar sign. Similarly
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps slightly clearer to say, "$ doesn't match a dollar sign."

Copy link
Contributor

Choose a reason for hiding this comment

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

And if so, "mean" could be replaced with "match" to clarify some other statements in this section.

once used in a common idiom to disable or quote the special meanings
of regular expression metacharacters in a string that you want to
use for a pattern. Simply quote all non-"word" characters:
=head2 Quoting (or escaping) metacharacters
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing headings is perilous, but I found no instances of this being linked to directly on CPAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misuse of "quote" in place of "escape" in documentation
4 participants