Subject: | PPI::Statement::Variable->variables() returns empty list |
Adam-
I noticed this while working on Perl::Critic. If I'm not mistaken, this should print "$foo $bar $baz". But instead, it prints nothing. I get the same behavior with C<our> and C<local> declarations.
use PPI;
my $code = <<'END_PERL';
my ($foo, $bar, $baz) = (1,2,3);
END_PERL
my $doc = PPI::Document->new(\$code);
$var = $doc->find_first('PPI::Statement::Variable');
print join ' ', $var->variables();