moznion / Perl-Lint

Yet Another Perl Source Code Linter
https://metacpan.org/pod/Perl::Lint
Other
95 stars 12 forks source link

Can't lint octal range '/[\000-\037]/' #53

Closed syohex closed 9 years ago

syohex commented 10 years ago
# test.pl
/[\000-\037]/

I got

Can't use an undefined value as an ARRAY reference at /home/syohei/.plenv/versions/5.20.0/lib/perl5/site_perl/5.20.0/Regexp/Parser.pm line 191, <$fh> line 1.
syohex commented 10 years ago

I got same error when there are some characters before - in bracket in regexp literal.

# test.pl
/[1-]/;
% perl -MPerl::Lint -wle 'Perl::Lint->new->lint(shift)' test.pl
Can't use an undefined value as an ARRAY reference at /home/syohei/.plenv/versions/5.20.0/lib/perl5/site_perl/5.20.0/Regexp/Parser.pm line 191, <$fh> line 1.
moznion commented 10 years ago

Umm, it looks Regexp::Parser's matter. I feel difficult to use Regexp::Parser on this project...

syohex commented 10 years ago

I checked failed cases. Most of them failed lint by this and #53.