This question is grounded in the belief that 90% of every perl application has already been written.

Use case #1) I maintain some code which is deployed for multiple clients and reads configuration data based on the url used to access the application. One of its many functions is to send out emails for folks based on what happens on the online forms. Those emails interpolate configuration variables and the paragraphs in the email come out looking ragged and ugly, depending on what client its for and how long a string pulled from the configuration file might be injected into the template text.

Use case #2) I've got a project demanding to be completed which will generate letters (using PDF::API2) on client provided letterhead, ready for printing and mailing. These letters will essentially merge browser supplied data from our web forms with a form letter crafted (and updated from time to time) by my clients, to produce the final personalized letter, ready for printing, signature and mailing.

For both of these purposes I am seeking a module which will make my paragraphs look justified in much the same way which this mapping from my .vimrc file makes my email look good:

}jp J {!}fmt -65
Surely I am not the first person to have this need. All leads are appreciated.

-- Hugh Esco

if( $lal && $lol ) { $life++; }

In reply to Seeking module for formatting text for output by hesco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.