http://www.perlmonks.org?node_id=1063971


in reply to Re: Code Reviews -- List Identifiers
in thread Code Reviews -- List Identifiers

Here's a quick PPI example:

use v5.12; use PPI; my $perl = PPI::Document::->new(do { local $/ = <DATA>; \$/ }); say $_ for @{ $perl->find('PPI::Token::Symbol') }; __DATA__ # Some sample code to analyse my $foo = 1; my @bar = (2, 3); say $bar[0];

The output includes a variable called $bar which doesn't really exist :-( But that shouldn't be a problem for the OP's use case.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name