We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://rt.cpan.org/Public/Bug/Display.html?id=67831
PPI 1.1.215/1.216_01 do not recognize the implicit end of statement that follows the block in a Perl 5.12 package statement:
ppidump 'package Foo {} sub bar { 1; }' PPI::Document PPI::Statement::Package [ 1, 1, 1 ] PPI::Token::Word 'package' [ 1, 9, 9 ] PPI::Token::Word 'Foo' PPI::Structure::Block { ... } [ 1, 16, 16 ] PPI::Token::Word 'sub' [ 1, 20, 20 ] PPI::Token::Word 'bar' PPI::Structure::Block { ... } PPI::Statement [ 1, 26, 26 ] PPI::Token::Number '1' [ 1, 27, 27 ] PPI::Token::Structure ';'
With an explicit statement terminator, it's fine:
ppidump 'package Foo {} ; sub bar { 1; }' PPI::Document PPI::Statement::Package [ 1, 1, 1 ] PPI::Token::Word 'package' [ 1, 9, 9 ] PPI::Token::Word 'Foo' PPI::Structure::Block { ... } [ 1, 16, 16 ] PPI::Token::Structure ';' PPI::Statement::Sub [ 1, 18, 18 ] PPI::Token::Word 'sub' [ 1, 22, 22 ] PPI::Token::Word 'bar' PPI::Structure::Block { ... } PPI::Statement [ 1, 28, 28 ] PPI::Token::Number '1' [ 1, 29, 29 ] PPI::Token::Structure ';'
The RT ticket includes a patch.
The text was updated successfully, but these errors were encountered:
RFC: In the 5.12 "package name version BLOCK" syntax, PPI currently can parse the version component as a float:
ppidump 'package foo 1.11;' PPI::Document PPI::Statement::Package [ 1, 1, 1 ] PPI::Token::Word 'package' [ 1, 9, 9 ] PPI::Token::Word 'foo' [ 1, 13, 13 ] PPI::Token::Number::Float '1.11' [ 1, 17, 17 ] PPI::Token::Structure ';'
though perl does recognize it:
perl -WE 'package foo 1.11 { print $VERSION }' 1.11
Should PPI force anything that can be a version to be a PPI::Token::Number::Version?
Sorry, something went wrong.
Statements like use 5.020 don't have their versions parsed as Versions. Going with the flow would seem to be to leave Float version numbers as Floats.
use 5.020
Merged into master with some refactoring.
Successfully merging a pull request may close this issue.
https://rt.cpan.org/Public/Bug/Display.html?id=67831
PPI 1.1.215/1.216_01 do not recognize the implicit end of statement that follows the block in a Perl 5.12 package statement:
With an explicit statement terminator, it's fine:
The RT ticket includes a patch.
The text was updated successfully, but these errors were encountered: