Author image thrig
and 1 contributors

NAME

Lingua::Awkwords::ListOf - container for a list of items

SYNOPSIS

This module is not typically used directly, as it will be created and called as part of the pattern parse and then render phases of other code.

DESCRIPTION

Container object for a list of items; upon render these items will each have render call on them and that concatenated result (minus anything excluded by filters) will be returned as a string.

ATTRIBUTES

filters

List of filters, if any.

filter_with

String to replaced filtered values with, the empty string by default.

terms

Items of the list are held here as an array reference.

METHODS

add value ..

Adds the given list of value to the terms.

add_filters filter ..

Adds one or more strings as a filter for the render phase. These limit what a unit can generate e.g. to remove repeated vowels from a [VV] pattern via [VV]^aa.

new

Constructor.

render

Calls render on turn on each item in the terms list, joins those results together, applies any filters, and returns that string result.

walk callback

Calls the callback function with itself as the argument, then calls walk on all of the available terms.

BUGS

Reporting Bugs

Please report any bugs or feature requests to bug-lingua-awkwords at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-Awkwords.

Patches might best be applied towards:

https://github.com/thrig/Lingua-Awkwords

Known Issues

None at this time.

SEE ALSO

Lingua::Awkwords, Lingua::Awkwords::Parser

AUTHOR

thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2017 by Jeremy Mates

This program is distributed under the (Revised) BSD License: http://www.opensource.org/licenses/BSD-3-Clause