Subject: | $RE{ comment }{ Perl } cannot be used in extended expression. |
$ cat ./test.pl
use Regexp::Common qw{ comment };
print( $RE{ comment }{ Perl }, "\n" );
"" =~ m{ $RE{ comment }{ Perl } }x;
$ perl ./test.pl
(?:(?:#)(?:[^\n]*)(?:\n))
Unmatched ( in regex; marked by <-- HERE in m/ (?:( <-- HERE ?:#)(?:[^\n]*)(?:\n)) / at ./test.pl line 3.
It seems $RE{ comment }{ Perl } should be
(?:(?-x)(?:#)(?:[^\n]*)(?:\n))