33## Preamble
44
55 Author: Karl Williamson <khw@cpan.org>
6- ID: KHW-0001
6+ ID: 0026
77 Status: Draft
88
99## Abstract
@@ -32,7 +32,7 @@ fixes that.
3232## Specification
3333
3434I propose adding a new opt-in feature. Call it, for now, "feature
35- enhanced_re_xx". Within its scope, the /xx modifier would change things so
35+ ` enhanced_re_xx ` ". Within its scope, the /xx modifier would change things so
3636that inside a bracketed character class [ ...] , any vertical space would be
3737treated as a blank, essentially ignored. Any unescaped '#' would begin a
3838comment that ends at the end of the line.
@@ -45,25 +45,31 @@ would be raised.
4545
4646And an unescaped '#' within a comment would raise a warning. So
4747
48+ ```
4849 $a[$i] =~ qr/ [ a-z # We need to match the lowercase alphabetics
4950 ! @ # . * # And certain punctuation
5051 0-9 # And the digits (which can only occur in $a[0])
5152 ]
5253 /xx;
54+ ```
5355
5456would warn.
5557
5658It might be that an unescaped '#' that isn't of the form \s+#\s+ should
5759warn to catch things like if the above example's second line were just
5860
61+ ```
5962 !@#.*
63+ ```
6064
6165Also, any comments inside [ ...] would check for an unescaped '] ' on the same
6266line after a '#', and raise a warning if found. So, something like
6367
68+ ```
6469 $a[$i] =~ qr/ [ a-z # . * ]
6570 [ A-Z ]
6671 /xx;
72+ ```
6773
6874would warn. Either escape the '#' or the '] ' to suppress it, depending on what
6975your intent was.
0 commit comments