{
    "content": [
        {
            "type": "text",
            "text": "# Text::Wrap (perldoc)\n\n## NAME\n\nText::Wrap - line wrapping to form simple paragraphs\n\n## SYNOPSIS\n\nExample 1\nuse Text::Wrap;\n$initialtab = \"\\t\";    # Tab before first line\n$subsequenttab = \"\";   # All other lines flush left\nprint wrap($initialtab, $subsequenttab, @text);\nprint fill($initialtab, $subsequenttab, @text);\n$lines = wrap($initialtab, $subsequenttab, @text);\n@paragraphs = fill($initialtab, $subsequenttab, @text);\nExample 2\nuse Text::Wrap qw(wrap $columns $huge);\n$columns = 132;         # Wrap at 132 characters\n$huge = 'die';\n$huge = 'wrap';\n$huge = 'overflow';\nExample 3\nuse Text::Wrap;\n$Text::Wrap::columns = 72;\nprint wrap('', '', @text);\n\n## DESCRIPTION\n\n\"Text::Wrap::wrap()\" is a very simple paragraph formatter. It formats a single paragraph at a\ntime by breaking lines at word boundaries. Indentation is controlled for the first line\n($initialtab) and all subsequent lines ($subsequenttab) independently. Please note:\n$initialtab and $subsequenttab are the literal strings that will be used: it is unlikely you\nwould want to pass in a number.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OVERRIDES**\n- **EXAMPLES**\n- **SUBVERSION**\n- **SEE ALSO**\n- **AUTHOR**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Text::Wrap",
        "section": "",
        "mode": "perldoc",
        "summary": "Text::Wrap - line wrapping to form simple paragraphs",
        "synopsis": "Example 1\nuse Text::Wrap;\n$initialtab = \"\\t\";    # Tab before first line\n$subsequenttab = \"\";   # All other lines flush left\nprint wrap($initialtab, $subsequenttab, @text);\nprint fill($initialtab, $subsequenttab, @text);\n$lines = wrap($initialtab, $subsequenttab, @text);\n@paragraphs = fill($initialtab, $subsequenttab, @text);\nExample 2\nuse Text::Wrap qw(wrap $columns $huge);\n$columns = 132;         # Wrap at 132 characters\n$huge = 'die';\n$huge = 'wrap';\n$huge = 'overflow';\nExample 3\nuse Text::Wrap;\n$Text::Wrap::columns = 72;\nprint wrap('', '', @text);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Code:",
            "print wrap(\"\\t\",\"\",<<END);",
            "This is a bit of text that forms",
            "a normal book-style indented paragraph",
            "END",
            "Result:",
            "\"     This is a bit of text that forms",
            "a normal book-style indented paragraph",
            "Code:",
            "$Text::Wrap::columns=20;",
            "$Text::Wrap::separator=\"|\";",
            "print wrap(\"\",\"\",\"This is a bit of text that forms a normal book-style paragraph\");",
            "Result:",
            "\"This is a bit of|text that forms a|normal book-style|paragraph\""
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "OVERRIDES",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "SUBVERSION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Text::Wrap - line wrapping to form simple paragraphs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Example 1\n\nuse Text::Wrap;\n\n$initialtab = \"\\t\";    # Tab before first line\n$subsequenttab = \"\";   # All other lines flush left\n\nprint wrap($initialtab, $subsequenttab, @text);\nprint fill($initialtab, $subsequenttab, @text);\n\n$lines = wrap($initialtab, $subsequenttab, @text);\n\n@paragraphs = fill($initialtab, $subsequenttab, @text);\n\nExample 2\n\nuse Text::Wrap qw(wrap $columns $huge);\n\n$columns = 132;         # Wrap at 132 characters\n$huge = 'die';\n$huge = 'wrap';\n$huge = 'overflow';\n\nExample 3\n\nuse Text::Wrap;\n\n$Text::Wrap::columns = 72;\nprint wrap('', '', @text);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Text::Wrap::wrap()\" is a very simple paragraph formatter. It formats a single paragraph at a\ntime by breaking lines at word boundaries. Indentation is controlled for the first line\n($initialtab) and all subsequent lines ($subsequenttab) independently. Please note:\n$initialtab and $subsequenttab are the literal strings that will be used: it is unlikely you\nwould want to pass in a number.\n\n\"Text::Wrap::fill()\" is a simple multi-paragraph formatter. It formats each paragraph separately\nand then joins them together when it's done. It will destroy any whitespace in the original\ntext. It breaks text into paragraphs by looking for whitespace after a newline. In other\nrespects, it acts like wrap().\n\n\"wrap()\" compresses trailing whitespace into one newline, and \"fill()\" deletes all trailing\nwhitespace.\n\nBoth \"wrap()\" and \"fill()\" return a single string.\n\nUnlike the old Unix fmt(1) utility, this module correctly accounts for any Unicode combining\ncharacters (such as diacriticals) that may occur in each line for both expansion and\nunexpansion. These are overstrike characters that do not increment the logical position. Make\nsure you have the appropriate Unicode settings enabled.\n",
                "subsections": []
            },
            "OVERRIDES": {
                "content": "\"Text::Wrap::wrap()\" has a number of variables that control its behavior. Because other modules\nmight be using \"Text::Wrap::wrap()\" it is suggested that you leave these variables alone! If you\ncan't do that, then use \"local($Text::Wrap::VARIABLE) = YOURVALUE\" when you change the values so\nthat the original value is restored. This \"local()\" trick will not work if you import the\nvariable into your own namespace.\n\nLines are wrapped at $Text::Wrap::columns columns (default value: 76). $Text::Wrap::columns\nshould be set to the full width of your output device. In fact, every resulting line will have\nlength of no more than \"$columns - 1\".\n\nIt is possible to control which characters terminate words by modifying $Text::Wrap::break. Set\nthis to a string such as '[\\s:]' (to break before spaces or colons) or a pre-compiled regexp\nsuch as \"qr/[\\s']/\" (to break before spaces or apostrophes). The default is simply '\\s'; that\nis, words are terminated by spaces. (This means, among other things, that trailing punctuation\nsuch as full stops or commas stay with the word they are \"attached\" to.) Setting\n$Text::Wrap::break to a regular expression that doesn't eat any characters (perhaps just a\nforward look-ahead assertion) will cause warnings.\n\nBeginner note: In example 2, above $columns is imported into the local namespace, and set\nlocally. In example 3, $Text::Wrap::columns is set in its own namespace without importing it.\n\n\"Text::Wrap::wrap()\" starts its work by expanding all the tabs in its input into spaces. The\nlast thing it does it to turn spaces back into tabs. If you do not want tabs in your results,\nset $Text::Wrap::unexpand to a false value. Likewise if you do not want to use 8-character\ntabstops, set $Text::Wrap::tabstop to the number of characters you do want for your tabstops.\n\nIf you want to separate your lines with something other than \"\\n\" then set\n$Text::Wrap::separator to your preference. This replaces all newlines with\n$Text::Wrap::separator. If you just want to preserve existing newlines but add new breaks with\nsomething else, set $Text::Wrap::separator2 instead.\n\nWhen words that are longer than $columns are encountered, they are broken up. \"wrap()\" adds a\n\"\\n\" at column $columns. This behavior can be overridden by setting $huge to 'die' or to\n'overflow'. When set to 'die', large words will cause \"die()\" to be called. When set to\n'overflow', large words will be left intact.\n\nHistorical notes: 'die' used to be the default value of $huge. Now, 'wrap' is the default value.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Code:\n\nprint wrap(\"\\t\",\"\",<<END);\nThis is a bit of text that forms\na normal book-style indented paragraph\nEND\n\nResult:\n\n\"     This is a bit of text that forms\na normal book-style indented paragraph\n\"\n\nCode:\n\n$Text::Wrap::columns=20;\n$Text::Wrap::separator=\"|\";\nprint wrap(\"\",\"\",\"This is a bit of text that forms a normal book-style paragraph\");\n\nResult:\n\n\"This is a bit of|text that forms a|normal book-style|paragraph\"\n",
                "subsections": []
            },
            "SUBVERSION": {
                "content": "This module comes in two flavors: one for modern perls (5.10 and above) and one for ancient\nobsolete perls. The version for modern perls has support for Unicode. The version for old perls\ndoes not. You can tell which version you have installed by looking at $Text::Wrap::SUBVERSION:\nit is \"old\" for obsolete perls and \"modern\" for current perls.\n\nThis man page is for the version for modern perls and so that's probably what you've got.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "For correct handling of East Asian half- and full-width characters, see Text::WrapI18N. For more\ndetailed controls: Text::Format.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "David Muir Sharnoff <cpan@dave.sharnoff.org> with help from Tim Pierce and many many others.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyright (C) 1996-2009 David Muir Sharnoff. Copyright (C) 2012-2013 Google, Inc. This module\nmay be modified, used, copied, and redistributed at your own risk. Although allowed by the\npreceding license, please do not publicly redistribute modified versions of this code with the\nname \"Text::Wrap\" unless it passes the unmodified Text::Wrap test suite.\n",
                "subsections": []
            }
        }
    }
}