NAME

App::wordlist::blossom - A wordlist wrapper to help list words for Blossom word game

VERSION

This document describes version 0.002 of App::wordlist::blossom (from Perl distribution App-wordlist-blossom), released on 2025-03-07.

FUNCTIONS

wordlist_blossom

Usage:

wordlist_blossom(%args) -> [$status_code, $reason, $payload, \%result_meta]

Help list words for Blossom word game.

Examples:

  • Example #1:

    wordlist_blossom(arg => ["AMGSOEN"]);
  • Only find pangrams:

    wordlist_blossom(arg => ["AMGSOEN"], pangram => 1);
  • Only list words 10 letters or more, and matches some regex:

    wordlist_blossom(arg => ["AMGSOEN", "/(ness|one)/"], min_len => 10);

This is a wrapper to wordlist designed to be a convenient helper to supply words for Blossom word game. By default it greps from the EN::Enable wordlist. It accepts a single string containing 7 letters, where the first letter is the word in the middle (which must always be present in the words). For example:

AMGSOEN

which is equivalent to this blossom:

  G         S

M         A          O

  N         E

This wrapper will form a regex pattern to search words satisfying the condition. The additional arguments will be passed to wordlist.

This function is not exported.

Arguments ('*' denotes required arguments):

  • arg => array[str]

    (No description)

  • color => str (default: "auto")

    When to highlight search string/matching pattern with color.

  • detail => bool

    Display more information when listing modules/result.

    When listing installed modules (-l), this means also returning a wordlist's language.

    When returning grep result, this means also returning wordlist name.

  • exclude_dynamic_wordlists => bool

    (No description)

  • exclude_wordlist_pattern => re_from_str

    (No description)

  • exclude_wordlists => array[str]

    Exclude wordlist modules.

  • ignore_case => bool (default: 1)

    (No description)

  • langs => array[str]

    Only include wordlists of certain language(s).

    By convention, language code is the first subnamespace of a wordlist module, e.g. WordList::EN::* for English, WordList::FR::* for French, and so on. Wordlist modules which do not follow this convention (e.g. WordList::Password::* or WordList::PersonName::*) are not included.

  • len => int

    (No description)

  • max_len => int

    (No description)

  • min_len => int (default: 4)

    (No description)

  • num => int (default: 0)

    Return (at most) this number of words (0 = unlimited).

  • or => bool

    Instead of printing words that must match all queries (the default), print words that match any query.

  • pangram => true

    Only find pangrams.

  • random => bool

    Pick random words.

    If set to true, then streaming will be turned off. All words will be gathered first, then words will be chosen randomly from the gathered list.

  • wordlist_bundles => array[str]

    Select one or more wordlist bundle (Acme::CPANModules::WordListBundle::*) modules.

  • wordlists => array[str] (default: ["EN::Enable"])

    Select one or more wordlist modules.

Returns an enveloped result (an array).

First element ($status_code) is an integer containing HTTP-like status code (200 means OK, 4xx caller error, 5xx function error). Second element ($reason) is a string containing error message, or something like "OK" if status is 200. Third element ($payload) is the actual result, but usually not present when enveloped result is an error response ($status_code is not 2xx). Fourth element (%result_meta) is called result metadata and is optional, a hash that contains extra information, much like how HTTP response headers provide additional metadata.

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-wordlist-blossom.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-wordlist-blossom.

SEE ALSO

Blossom word game, https://www.merriam-webster.com/games/blossom-word-game

AUTHOR

perlancar <perlancar@cpan.org>

CONTRIBUTING

To contribute, you can send patches by email/via RT, or send pull requests on GitHub.

Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:

% prove -l

If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by perlancar <perlancar@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-wordlist-blossom

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.