summaryrefslogtreecommitdiff
path: root/textproc/p5-Text-Template/DESCR
blob: 87fb3eb56ec19c6d8af4d8eaf9b6a9e57f763668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  This is a library for generating form letters, building HTML pages,
or filling in templates generally.  A `template' is a piece of text
that has little Perl programs embedded in it here and there.  When
you `fill in' a template, you evaluate the little programs and
replace them with their values.  Here's an example of a template:

        Dear {$title} {$lastname},

        It has come to our attention that you are delinquent in your
        {$monthname[$last_paid_month]} payment.  Please remit
        ${sprintf("%.2f", $amount)} immediately, or your patellae may
        be needlessly endangered.


The result of filling in this template is a string, which might look
something like this:

        Dear Mr. Gates,

        It has come to our attention that you are delinquent in your
        February payment.  Please remit
        $392.12 immediately, or your patellae may
        be needlessly endangered.