Open petdance opened 5 years ago
> ppi_dumper minimal
PPI::Document
PPI::Token::Comment '#!/usr/bin/perl\n'
PPI::Token::Whitespace '\n'
PPI::Statement
PPI::Token::Word 'open'
PPI::Structure::List ( ... )
PPI::Statement::Scheduled
PPI::Token::Word 'CHECK'
PPI::Token::Operator ','
PPI::Token::Whitespace ' '
PPI::Token::Quote::Single ''/foo''
PPI::Token::Structure ';'
PPI::Token::Whitespace '\n'
I believe this is because CHECK is triggering PPI to think it's a CHECK {}
block... the Statement object in the middle of the expression is then confusing parse_arg_list.
If you get this fixed, please make a note of it on the corresponding Perl::Critic policy, too.
This may be fixed by https://github.com/Perl-Critic/PPI/pull/247
Prompted by https://www.reddit.com/r/perl/comments/c4lhaq/and_most_damning_of_all_the_resulting_code_was/erx5hno/
See also https://github.com/Perl-Critic/Perl-Critic/issues/878