1Template::Plugin::Wrap(U3s)er Contributed Perl DocumentatTieomnplate::Plugin::Wrap(3)
2
3
4

NAME

6       Template::Plugin::Wrap - Plugin interface to Text::Wrap
7

SYNOPSIS

9           [% USE wrap %]
10
11           # call wrap subroutine
12           [% wrap(mytext, width, initial_tab,  subsequent_tab) %]
13
14           # or use wrap FILTER
15           [% mytext FILTER wrap(width, initital_tab, subsequent_tab) %]
16

DESCRIPTION

18       This plugin provides an interface to the Text::Wrap module which pro‐
19       vides simple paragraph formatting.
20
21       It defines a 'wrap' subroutine which can be called, passing the input
22       text and further optional parameters to specify the page width
23       (default: 72), and tab characters for the first and subsequent lines
24       (no defaults).
25
26           [% USE wrap %]
27
28           [% text = BLOCK %]
29           First, attach the transmutex multiplier to the cross-wired
30           quantum homogeniser.
31           [% END %]
32
33           [% wrap(text, 40, '* ', '  ') %]
34
35       Output:
36
37           * First, attach the transmutex
38             multiplier to the cross-wired quantum
39             homogeniser.
40
41       It also registers a 'wrap' filter which accepts the same three optional
42       arguments but takes the input text directly via the filter input.
43
44           [% FILTER bullet = wrap(40, '* ', '  ') -%]
45           First, attach the transmutex multiplier to the cross-wired quantum
46           homogeniser.
47           [%- END %]
48
49           [% FILTER bullet -%]
50           Then remodulate the shield to match the harmonic frequency, taking
51           care to correct the phase difference.
52           [% END %]
53
54       Output:
55
56           * First, attach the transmutex
57             multiplier to the cross-wired quantum
58             homogeniser.
59
60           * Then remodulate the shield to match
61             the harmonic frequency, taking
62             care to correct the phase difference.
63

AUTHOR

65       Andy Wardley <abw@wardley.org>
66
67       The Text::Wrap module was written by David Muir Sharnoff
68       <muir@idiom.com> with help from Tim Pierce and many others.
69

VERSION

71       2.68, distributed as part of the Template Toolkit version 2.18,
72       released on 09 February 2007.
73
75         Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
76
77       This module is free software; you can redistribute it and/or modify it
78       under the same terms as Perl itself.
79

SEE ALSO

81       Template::Plugin, Text::Wrap
82
83
84
85perl v5.8.8                       2007-02-09         Template::Plugin::Wrap(3)
Impressum