Subject: | incorect var=-Foo::Bar::meth() / makes -Foo and ::Bar |
Date: | Tue, 16 Oct 2007 18:18:07 +0100 |
To: | bug-PPI [...] rt.cpan.org |
From: | Martin Friebe <martin [...] hybyte.com> |
for the code $a=-xx::cc() see below
instead of 2 Words "-xx" and "::cc", there should be an operator "-" and
a word "xx::cc"
tested with PPI 1.200 / perl 5.8.8
perl -wle 'use PPI; use Data::Dumper; $a= "\$a=-xx::cc() "; warn
Dumper( PPI::Document->new(\$a) )'
$VAR1 = bless( {
'readonly' => '',
'children' => [
bless( {
'children' => [
bless( {
'content' => '$a'
},
'PPI::Token::Symbol' ),
bless( {
'content' => '='
},
'PPI::Token::Operator' ),
bless( {
'content' => '-xx'
},
'PPI::Token::Word' ),
bless( {
'content' => '::cc'
},
'PPI::Token::Word' ),
bless( {
'finish' => bless( {
'content' => ')'
}, 'PPI::Token::Structure' ),
'children' => [],
'start' => bless( {
'content' => '('
}, 'PPI::Token::Structure' )
},
'PPI::Structure::List' )
]
}, 'PPI::Statement' ),
bless( {
'content' => ' '
}, 'PPI::Token::Whitespace' )
],
'tab_width' => 1
}, 'PPI::Document' );