summaryrefslogtreecommitdiff
path: root/pod/perldiag.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-12-20 13:41:58 -0700
committerKarl Williamson <khw@cpan.org>2016-12-23 22:52:44 -0700
commit94749a5ed2171bb6de72e384a78f5df552d812bb (patch)
treececdd172789047a484c5623cd15f1bce424fc1f1 /pod/perldiag.pod
parent9e7ded3f8151b7f66398bfd77fca0565ee90166a (diff)
downloadperl-94749a5ed2171bb6de72e384a78f5df552d812bb.tar.gz
Deprecate non-grapheme string delimiter
In order for Perl to eventually allow string delimiters to be Unicode grapheme clusters (which look like a single character, but may be multiple ones), we have to stop allowing a single char delimiter that isn't a grapheme by itself. These are unlikely to exist in actual code, as they would typically display as attached to the character in front of them, but we should be sure.
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r--pod/perldiag.pod25
1 files changed, 25 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 13cf13d620..450aa3685a 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -7064,6 +7064,31 @@ arguments and at least one of them is tainted. This used to be allowed
but will become a fatal error in a future version of perl. Untaint your
arguments. See L<perlsec>.
+=item Use of unassigned code point or non-standalone grapheme for a
+delimiter will be a fatal error starting in Perl v5.30
+
+(D deprecated)
+A grapheme is what appears to a native-speaker of a language to be a
+character. In Unicode (and hence Perl) a grapheme may actually be
+several adjacent characters that together form a complete grapheme. For
+example, there can be a base character, like "R" and an accent, like a
+circumflex "^", that appear when displayed to be a single character with
+the circumflex hovering over the "R". Perl currently allows things like
+that circumflex to be delimiters of strings, patterns, I<etc>. When
+displayed, the circumflex would look like it belongs to the character
+just to the left of it. In order to move the language to be able to
+accept graphemes as delimiters, we have to deprecate the use of
+delimiters which aren't graphemes by themselves. Also, a delimiter must
+already be assigned (or known to be never going to be assigned) to try
+to future-proof code, for otherwise code that works today would fail to
+compile if the currently unassigned delimiter ends up being something
+that isn't a stand-alone grapheme. Because Unicode is never going to
+assign
+L<non-character code points|perlunicode/Noncharacter code points>, nor
+L<code points that are above the legal Unicode maximum|
+perlunicode/Beyond Unicode code points>, those can be delimiters, and
+their use won't raise this warning.
+
=item Use of uninitialized value%s
(W uninitialized) An undefined value was used as if it were already