Subject: | PPI::Tokenizer ALLOW_NONASCII problem |
I found a bug in PPI::Tokenizer.
I think, this logic is inverse.
In current version, always reject the NONASCII.
--- Tokenizer.pm.org 2005-05-19 22:38:40.000000000 +0900
+++ Tokenizer.pm 2005-05-19 23:03:51.000000000 +0900
@@ -161,7 +161,7 @@
}
# Check for non-standard characters
- if ($ALLOW_NONASCII or $self->{source} =~ /([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;\[\]{}()=?|+<>.!~^*\$\@&:\%#,'"`\\\/_ \n\t-])/ ) {
+ if ( ! $ALLOW_NONASCII and $self->{source} =~ /([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;\[\]{}()=?|+<>.!~^*\$\@&:\%#,'"`\\\/_ \n\t-])/ ) {
return $self->_error( "Source code contains unsupported characters (first one encountered was '$1')" );
}