Subject: | PPI::Statement::Variable::variables breaks for lists with leading whitespace |
Variables are not correctly parsed by
PPI::Statement::Variable::variables when those variables are contained
in a list and the list has whitespace prior to the first variable.
e.g.:
my ($self, $param) = @_; # ok
my ( $self, $param ) = @_; # not ok
I have attached a patch to remedy this.
Subject: | variable_patch.txt |
--- Variable.pm 2006-09-19 23:32:05.160950100 -0700
+++ Variable.pm 2006-09-19 23:31:55.232668100 -0700
@@ -135,7 +135,7 @@
# If it's a list, return as a list
if ( _INSTANCE($schild[1], 'PPI::Structure::List') ) {
- my $Expression = $schild[1]->child(0);
+ my $Expression = $schild[1]->schild(0);
$Expression and
$Expression->isa('PPI::Statement::Expression') or return ();