NAME

Text::Find::Variable - Find scalar names in a text.

SYNOPSIS

use Text::Find::Variable;

my $finder = Text::Find::Variable->new();
my $arrayref = $finder->find($string);

# or

$finder->find($string);
while($finder->hasNext()){
  print $finder->nextElement();
}

DESCRIPTION

This Class helps to find all Scalar variables in a text. It is recommended to use PPI to parse Perl programs. This module should help to find SCALAR names e.g. in Error messages.

METHODS

new

my $finder = Text::Find::Scalar->new();

find

my $string = q~Test $test $foo '$bar'~;
my $arrayref = $finder->find($string);

hasNext

while($finder->hasNext()){
  print $finder->nextElement();
}

nextElement

print $finder->nextElement();
print $finder->nextElement();

unique

my $uniquenames = $finder->unique();

count

my $counter = $finder->count('$foo');

AUTHOR

Renee Baecker, <module@renee-baecker.de>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Renee Baecker

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.