CC: | lesamoureuses [...] gmail.com |
Subject: | perl_version_introduced bug |
Japanese Katakana "ム" is represented by octal code "\343\203\240".
Using it and /x, perl_version_introduced value is not right.
===
my $re = PPIx::Regexp->new("qr/\343\203\240/x");
print $re->perl_version_introduced; #=> 5.017009 # If it's PPIx-Regexp-0.032, the result is 5.005.
===
"\343\203\240" is represented by hexadecimal code "\x{E3}\x{83}\x{A0}".
The last word "\x{A0}" is interpreted as Whitespace.
===
# use Data::Dumper
'children' => [
bless( {
'content' => '
}, 'PPIx::Regexp::Token::Literal' ),
bless( {
'content' => '�'
}, 'PPIx::Regexp::Token::Literal' ),
bless( {
'perl_version_introduced' => '5.017009',
'content' => '�'
}, 'PPIx::Regexp::Token::Whitespace' )
],
===