App-PRT
view release on metacpan or search on metacpan
lib/App/PRT/Command/IntroduceVariables.pm view on Meta::CPAN
my ($self, @arguments) = @_;
use Data::Dumper;
@arguments;
}
sub execute {
my ($self, $file, $out) = @_;
my $variables = $self->collect_variables($file);
for my $variable (@$variables) {
say $out $variable;
}
}
sub collect_variables {
my ($self, $file) = @_;
my $document = PPI::Document->new($file);
my $knowns = {};
my $variables = [];
my $tokens = $document->find('PPI::Token::Symbol');
( run in 1.730 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )