Name : perl-WordList
| |
Version : 0.1.2
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.1
| Date : 2018-01-23 02:06:55
|
Group : Development/Libraries/Perl
| Source RPM : perl-WordList-0.1.2-1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : (none)
| |
Summary : Word lists
|
Description :
*EARLY DEVELOPMENT, SPECIFICATION MIGHT STILL CHANGE CONSIDERABLY.*
\'WordList::*\' modules are modules that contain, well, list of words. This module, \'WordList\', serves as a base class and establishes convention for such modules.
\'WordList\' is an alternative interface for Games::Word::Wordlist and \'Games::Word::Wordlist::*\'. Its main difference is: \'WordList::*\' modules are read-only/immutable and designed to have low startup overhead. This makes it more suitable for use in CLI scripts which often only want to pick a word from one or several lists.
Words (or phrases) must be put in __DATA__ section, *sorted*, one per line. By putting it in the __DATA__ section, perl doesn\'t have to parse the list. To search for words or picking some random words from the list, the module need not slurp the whole list into memory (and will not do so unless explicitly instructed.) Sorting must be asciibetical/by Unicode codepoint. This makes it more convenient to diff different versions of the module, as well as performing binary search.
Since this is a new and non-backward compatible interface from Games::Word::Wordlist, I also make some other changes:
* * Namespace is put outside \'Games::\'
Because obviously word lists are not only useful for games.
* * Interface is simpler
This is partly due to the list being read-only. The methods provided are just:
- \'pick\' (pick one or several random entries)
- \'word_exists\' (check whether a word is in the list)
- \'each_word\' (run code for each entry)
- \'all_words\' (return all the words in a list)
A couple of other functions might be added, with careful consideration.
* * Namespace is more language-neutral and not English-centric
TODOS:
* * Interface for random pick from a subset
Pick $n words of length $L.
Pick $n words matching regex $re.
* * Interface to enable faster lookup/caching
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_12_SP2/noarch |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
perl(WordList)
perl-WordList
Requires :