POE::Filter::ParseWords - A POE-based parser to parse text into an array of tokens.
version 1.08
use POE::Filter::ParseWords; my $filter = POE::Filter::ParseWords->new(); my $arrayref = $filter->get( [ $line ] );
POE::Filter::ParseWords provides a convenient way to parse text into an array of tokens. It is a wrapper for the module Text::ParseWords.
A more comprehensive demonstration of the use to which this module can be put to is in the examples/ directory of this distribution.
new
Creates a new POE::Filter::ParseWords object. Takes two optional arguments:
'delim', specify a delimiter, default is '\s+'; 'keep', specify whether other characters are kept or not, default is false;
get
get_one_start
get_one
Takes an arrayref which is contains lines of text. Returns an arrayref of lists of tokenised output.
put
This is not implemented.
clone
Makes a copy of the filter, and clears the copy's buffer.
POE
Text::ParseWords
POE::Filter
POE::Filter::Line
POE::Filter::Stackable
Chris Williams <chris@bingosnet.co.uk>
This software is copyright (c) 2017 by Chris Williams.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install POE::Filter::ParseWords, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Filter::ParseWords
CPAN shell
perl -MCPAN -e shell install POE::Filter::ParseWords
For more information on module installation, please visit the detailed CPAN module installation guide.