NAME
App::termpub::Hyphen - determine positions for hyphens inside words
SYNOPSIS
This module implements Knuth-Liang algorithm to find positions inside words where it is possible to insert hyphens to break a line.
use Text::Hyphen;
my $hyphenator = new Text::Hyphen;
print $hyphenator->hyphenate('representation');
# prints rep-re-sen-ta-tion
This is a fork of Text::Hyphen to use hunspell dictionaries.
EXPORT
This version does not export anything and uses OOP interface. This will probably change.
FUNCTIONS
new(%options)
Creates the hyphenator object.
You can pass several options:
- min_word
-
Minimum length of word to be hyphenated. Shorter words are returned right away. Defaults to 5.
- min_prefix
-
Minimal prefix to leave without any hyphens. Defaults to 2.
- min_suffix
-
Minimal suffix to leave wothout any hyphens. Defaults to 2.
hyphenate($word, [$delim])
Hyphenates the $word
by inserting $delim
into hyphen positions. $delim
defaults to dash ("-").
AUTHOR
Alex Kapranoff, <kappa at cpan.org>
Mario Domgörgen <mario at domgoergen.com>
COPYRIGHT & LICENSE
Copyright 2008 Alex Kapranoff. Copyright 2019 Mario Domgörgen.
This program is released under the following license: BSD.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 197:
Non-ASCII character seen before =encoding in 'Domgörgen'. Assuming UTF-8
- Around line 199:
=back without =over