{
    "mode": "perldoc",
    "parameter": "Template::Plugin::Wrap",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Template%3A%3APlugin%3A%3AWrap/json",
    "generated": "2026-07-05T09:30:15Z",
    "synopsis": "[% USE wrap %]\n# call wrap subroutine\n[% wrap(mytext, width, initialtab,  subsequenttab) %]\n# or use wrap FILTER\n[% mytext FILTER wrap(width, inititaltab, subsequenttab) %]",
    "sections": {
        "NAME": {
            "content": "Template::Plugin::Wrap - Plugin interface to Text::Wrap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "[% USE wrap %]\n\n# call wrap subroutine\n[% wrap(mytext, width, initialtab,  subsequenttab) %]\n\n# or use wrap FILTER\n[% mytext FILTER wrap(width, inititaltab, subsequenttab) %]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This plugin provides an interface to the Text::Wrap module which provides simple paragraph\nformatting.\n\nIt defines a \"wrap\" subroutine which can be called, passing the input text and further optional\nparameters to specify the page width (default: 72), and tab characters for the first and\nsubsequent lines (no defaults).\n\n[% USE wrap %]\n\n[% text = BLOCK %]\nFirst, attach the transmutex multiplier to the cross-wired\nquantum homogeniser.\n[% END %]\n\n[% wrap(text, 40, '* ', '  ') %]\n\nOutput:\n\n* First, attach the transmutex\nmultiplier to the cross-wired quantum\nhomogeniser.\n\nIt also registers a \"wrap\" filter which accepts the same three optional arguments but takes the\ninput text directly via the filter input.\n\nExample 1:\n\n[% FILTER bullet = wrap(40, '* ', '  ') -%]\nFirst, attach the transmutex multiplier to the cross-wired quantum\nhomogeniser.\n[%- END %]\n\nOutput:\n\n* First, attach the transmutex\nmultiplier to the cross-wired quantum\nhomogeniser.\n\nExample 2:\n\n[% FILTER bullet -%]\nThen remodulate the shield to match the harmonic frequency, taking\ncare to correct the phase difference.\n[% END %]\n\nOutput:\n\n* Then remodulate the shield to match\nthe harmonic frequency, taking\ncare to correct the phase difference.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Andy Wardley <abw@wardley.org> <http://wardley.org/>\n\nThe Text::Wrap module was written by David Muir Sharnoff with help from Tim Pierce and many\nothers.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Template::Plugin, Text::Wrap\n",
            "subsections": []
        }
    },
    "summary": "Template::Plugin::Wrap - Plugin interface to Text::Wrap",
    "flags": [],
    "examples": [],
    "see_also": []
}