.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Template::Plugin::Wrap 3pm" .TH Template::Plugin::Wrap 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Template::Plugin::Wrap \- Plugin interface to Text::Wrap .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& [% USE wrap %] \& \& # call wrap subroutine \& [% wrap(mytext, width, initial_tab, subsequent_tab) %] \& \& # or use wrap FILTER \& [% mytext FILTER wrap(width, initital_tab, subsequent_tab) %] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This plugin provides an interface to the Text::Wrap module which provides simple paragraph formatting. .PP It defines a \f(CW\*(C`wrap\*(C'\fR subroutine which can be called, passing the input text and further optional parameters to specify the page width (default: 72), and tab characters for the first and subsequent lines (no defaults). .PP .Vb 1 \& [% USE wrap %] \& \& [% text = BLOCK %] \& First, attach the transmutex multiplier to the cross\-wired \& quantum homogeniser. \& [% END %] \& \& [% wrap(text, 40, \*(Aq* \*(Aq, \*(Aq \*(Aq) %] .Ve .PP Output: .PP .Vb 3 \& * First, attach the transmutex \& multiplier to the cross\-wired quantum \& homogeniser. .Ve .PP It also registers a \f(CW\*(C`wrap\*(C'\fR filter which accepts the same three optional arguments but takes the input text directly via the filter input. .PP Example 1: .PP .Vb 4 \& [% FILTER bullet = wrap(40, \*(Aq* \*(Aq, \*(Aq \*(Aq) \-%] \& First, attach the transmutex multiplier to the cross\-wired quantum \& homogeniser. \& [%\- END %] .Ve .PP Output: .PP .Vb 3 \& * First, attach the transmutex \& multiplier to the cross\-wired quantum \& homogeniser. .Ve .PP Example 2: .PP .Vb 4 \& [% FILTER bullet \-%] \& Then remodulate the shield to match the harmonic frequency, taking \& care to correct the phase difference. \& [% END %] .Ve .PP Output: .PP .Vb 3 \& * Then remodulate the shield to match \& the harmonic frequency, taking \& care to correct the phase difference. .Ve .SH AUTHOR .IX Header "AUTHOR" Andy Wardley .PP The Text::Wrap module was written by David Muir Sharnoff with help from Tim Pierce and many others. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 1996\-2007 Andy Wardley. All Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Template::Plugin, Text::Wrap