NAME
Lingua::Lapine::Word - module to interact with the words of Lapine
VERSION
version v0.01
SYNOPSIS
use Lingua::Lapine::Word;
my Lingua::Lapine::Word $word = Lingua::Lapine::Word->new(string => 'mi');
say $word->as_string;
This module inherits from Lingua::Generic::Interface::Word (since v0.01), and Data::Identifier::Interface::Known (since v0.01).
METHODS
new
my Lingua::Lapine::Word $word = Lingua::Lapine::Word->new($type => $value);
# e.g.:
my Lingua::Lapine::Word $word = Lingua::Lapine::Word->new(string => 'Frith');
(since v0.01)
Constructs a new word. This method deduplicate instances.
Currently the following types ($type) are supported:
from-
(since v0.01)
Constructs a word from an object.
$valueshould be a reference.Currently references to the following types are supported: Lingua::Lapine::Word. More types might be supported.
If
$valueis not a reference the value is parsed as perstringif it looks like a word string (experimental since v0.01). string-
(since v0.01)
Constructs a word from it's string representation.
natural_language
my Data::Identifier $natural_language = $word->natural_language;
(since v0.03)
Returns the natural language this word is in.
For Lapine words it will always return Lapine. However this method might be useful together with other modules from the Lingua namespace.
See also: "natural_language" in Lingua::Generic::Interface::Word.
register
$word->register;
(since v0.01)
Registers the word with this module. A registered word will be kept in memory indefinitely. It is used for deduplication and some types of lookups.
This method will return $word. This can be used to build constants.
Note: Calling this multiple times on the same word is fine. However, doing so might waste some time.
Note: It is undefined (since v0.01) whether or not this will also register the corresponding Data::Identifier.
known
my @list = Lingua::Lapine::Word->known($class [, %opts ] );
(since v0.01)
Returns the known items for the given class.
For details and supported options see "known" in Data::Identifier::Interface::Known.
The following classes are supported:
AUTHOR
Philipp Schafft <lion@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Philipp Schafft <lion@cpan.org>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)