{
    "content": [
        {
            "type": "text",
            "text": "# Data::Random::WordList (perldoc)\n\n## NAME\n\nData::Random::WordList - Perl module to get random words from a word list\n\n## SYNOPSIS\n\nuse Data::Random::WordList;\nmy $wl = new Data::Random::WordList( wordlist => '/usr/share/dict/words' );\nmy @randwords = $wl->getwords(10);\n$wl->close();\n\n## DESCRIPTION\n\nData::Random::WordList is a module that manages a file containing a list of words.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **VERSION**\n- **AUTHOR**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Data::Random::WordList",
        "section": "",
        "mode": "perldoc",
        "summary": "Data::Random::WordList - Perl module to get random words from a word list",
        "synopsis": "use Data::Random::WordList;\nmy $wl = new Data::Random::WordList( wordlist => '/usr/share/dict/words' );\nmy @randwords = $wl->getwords(10);\n$wl->close();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Data::Random::WordList - Perl module to get random words from a word list\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Data::Random::WordList;\n\nmy $wl = new Data::Random::WordList( wordlist => '/usr/share/dict/words' );\n\nmy @randwords = $wl->getwords(10);\n\n$wl->close();\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Data::Random::WordList is a module that manages a file containing a list of words.\n\nThe module expects each line of the word list file to contain only one word. It could thus be\neasily used to select random lines from a file, but for coherency's sake, I'll keep referring to\neach line as a word.\n\nThe module uses a persistent filehandle so that there isn't a lot of overhead every time you\nwant to fetch a list of random words. However, it's much more efficient to grab multiple words\nat a time than it is to fetch one word at a time multiple times.\n\nThe module also refrains from reading the whole file into memory, so it can be safer to use with\nlarger files.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new()\nReturns a reference to a new Data::Random::WordList object. Use the \"wordlist\" param to\ninitialize the object:\n\n*   wordlist - the path to the wordlist file. If a path isn't supplied, the wordlist distributed\nwith this module is used.\n\ngetwords([NUM])\nNUM contains the number of words you want from the wordlist. NUM defaults to 1 if it's not\nspecified. getwords() dies if NUM is greater than the number of words in the wordlist. This\nfunction returns an array or an array reference depending on the context in which it's called.\n\nclose()\nCloses the filehandle associated with the word list. It's good practice to do this every time\nyou're done with the word list.\n",
                "subsections": []
            },
            "VERSION": {
                "content": "0.12\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Originally written by: Adekunle Olonoh\n\nCurrently maintained by: Buddy Burden (barefoot@cpan.org), starting with version 0.06\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2000-2011 Adekunle Olonoh. Copyright (c) 2011-2015 Buddy Burden. All rights\nreserved. This program is free software; you can redistribute it and/or modify it under the same\nterms as Perl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Data::Random\n",
                "subsections": []
            }
        }
    }
}