]> Sergey Matveev's repositories - public-inbox.git/commitdiff
HACKING: document Perl character class gotcha
authorEric Wong <e@80x24.org>
Wed, 2 Oct 2019 19:32:42 +0000 (19:32 +0000)
committerEric Wong <e@80x24.org>
Wed, 2 Oct 2019 19:53:30 +0000 (19:53 +0000)
It took me years to discover this change in Perl 5.6,
maybe other potential hackers are in the same boat.

HACKING

diff --git a/HACKING b/HACKING
index f7cb92e96948b552bb360971c380e3ccb38ff371..666d504e7336b61ef7d26f559e5b192c56fbd9de 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -50,3 +50,11 @@ requirements.
 
 See design_www.txt and design_notes.txt in the Documentation/
 directory for design decisions made during development.
+
+Perl notes
+----------
+
+* \w, \s, \d character classes all match Unicode characters;
+  so write out class ranges (e.g "[0-9]") if you only intend to
+  match ASCII.  Do not use the "/a" (ASCII) modifier, that requires
+  Perl 5.14 and we're only depending on 5.10.1 at the moment.