File: demo_footer.pl

package info (click to toggle)
libtext-reform-perl 1.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 188 kB
  • ctags: 31
  • sloc: perl: 1,251; makefile: 39
file content (22 lines) | stat: -rw-r--r-- 488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/perl -w 
use strict;

use Text::Reform;

print form(
  {
    pagewidth => 40,
    pagelen =>  10,
    footer =>   sub {
                    if ($#_) {
                      return "-" x 50 . "\n" .  "Special end of report note";
                    } else {
                      return {
                               center => "\n-- Page $_[0] --\n\n"
                             };
                    }
                  },
    },
  ']]]]]]]]]]]',
  ("hello\n" x 18)
);