™.. Mail::DKIM::TextWrap - Online Linux Manual PageSection : 3
Updated : 2009-07-30
Source : perl v5.10.1
Note : User Contributed Perl Documentation

NAMEMail::DKIM::TextWrap − text wrapping module written for use with DKIM

SYNOPSIS​ my $output = ""; ​ my $tw = Mail::DKIM::TextWrap−>new( ​ Margin => 10, ​ Output => \$output, ​ ); ​ $tw−>add("Mary had a little lamb, whose fleece was white as snow.\n"); ​ $tw−>finish; ​ ​ print $output;

DESCRIPTIONThis is a general-purpose text-wrapping module that I wrote because I had some specific needs with Mail::DKIM that none of the contemporary text-wrapping modules offered. Specifically, it offers the ability to change wrapping options in the middle of a paragraph. For instance, with a DKIM signature: ​ DKIM−Signature: a=rsa; c=simple; h=first:second:third:fourth; ​ b=Xr2mo2wmb1LZBwmEJElIPezal7wQQkRQ8WZtxpofkNmXTjXf8y2f0 the line-breaks can be inserted next to any of the colons of the h= tag, or any character of the b= tag. The way I implemented this was to serialize the signature one element at a time, changing the text-wrapping options at the start and end of each tag.

TEXT WRAPPING OPTIONSText wrapping options can be specified when calling new(), or by simply changing the property as needed. For example, to change the number of characters allowed per line: ​ $tw−>{Margin} = 20; Break a regular expression matching characters where a line break can be inserted. Line breaks are inserted AFTER a matching substring. The default is \*(C`/\es/\*(C'\fR. BreakBefore a regular expression matching characters where a line break can be inserted. Line breaks are inserted BEFORE a matching substring. Usually, you want to use Break, rather than BreakBefore. The default is \*(C`undef\*(C'\fR. Margin specifies how many characters to allow per line. The default is 72. If no place to line-break is found on a line, the line will extend beyond this margin. Separator the text to insert when a linebreak is needed. The default is \n. If you want to set a following-line indent (e.g. all lines but the first begin with four spaces), use something like \n . Swallow a regular expression matching characters that can be omitted when a line break occurs. For example, if you insert a line break between two words, then you are replacing a space with the line break, so you are omitting the space. On the other hand, if you insert a line break between two parts of a hyphenated word, then you are breaking at the hyphen, but you still want to display the hyphen. The default is \*(C`/\es/\*(C'\fR.

CONSTRUCTOR

new() − create a new text-wrapping object​ my $tw = Mail::DKIM::TextWrap−>new( ​ Output => \$output, ​ %wrapping_options, ​ ); The text-wrapping object encapsulates the current options and the current state of the text stream. In addition to specifying text wrapping options as described in the section above, the following options are recognized: Output a scalar reference, or a glob reference, to specify where the ​wrapped text gets output to. If not specified, the default of ​STDOUT is used.

METHODS

add() − process some text that can be wrapped​ $tw−>add("Mary had a little lamb.\n"); You can add() all the text at once, or add() the text in parts by calling ​add() multiple times.

finish() − call when no more text is to be added​ $tw−>finish; Call this when finished adding text, so that any remaining text in TextWrap's buffers will be output.

flush() − output the current partial word, if any​ $tw−>flush; Call this whenever changing TextWrap's parameters in the middle of a string of words. It explicitly allows a line-break at the current position in the string, regardless of whether it matches the current break pattern.
0
Johanes Gumabo
Data Size   :   12,636 byte
man-Mail::DKIM::TextWrap.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 173,419
Visitor ID   :     :  
Visitor IP   :   3.144.105.101   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Mail::DKIM::TextWrap.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Mail::DKIM::TextWrap.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Mail::DKIM::TextWrap.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|Mail::DKIM::TextWrap.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|Mail::DKIM::TextWrap.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|Mail::DKIM::TextWrap.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|Mail::DKIM::TextWrap.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|Mail::DKIM::TextWrap.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|Mail::DKIM::TextWrap.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|Mail::DKIM::TextWrap.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|Mail::DKIM::TextWrap.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|Mail::DKIM::TextWrap.3pm|178|\*(C`/\es/\*(C'\fR. |The default is \f(CW\*(C`/\es/\*(C'\fR. )         (rof_escape_sequence|91|Mail::DKIM::TextWrap.3pm|184|\*(C`undef\*(C'\fR. |The default is \f(CW\*(C`undef\*(C'\fR. )         (rof_escape_sequence|91|Mail::DKIM::TextWrap.3pm|205|\*(C`/\es/\*(C'\fR. |The default is \f(CW\*(C`/\es/\*(C'\fR. )