1Text::SimpleTable(3)  User Contributed Perl Documentation Text::SimpleTable(3)
2
3
4

NAME

6       Text::SimpleTable - Simple Eyecandy ASCII Tables
7

SYNOPSIS

9           use Text::SimpleTable;
10
11           my $t1 = Text::SimpleTable->new(5, 10);
12           $t1->row('foobarbaz', 'yadayadayada');
13           print $t1->draw;
14
15           .-------+------------.
16           | foob- | yadayaday- |
17           | arbaz | ada        |
18           '-------+------------'
19
20           my $t2 = Text::SimpleTable->new([5, 'Foo'], [10, 'Bar']);
21           $t2->row('foobarbaz', 'yadayadayada');
22           $t2->row('barbarbarbarbar', 'yada');
23           print $t2->draw;
24
25           .-------+------------.
26           | Foo   | Bar        |
27           +-------+------------+
28           | foob- | yadayaday- |
29           | arbaz | ada        |
30           | barb- | yada       |
31           | arba- |            |
32           | rbar- |            |
33           | bar   |            |
34           '-------+------------'
35
36           my $t3 = Text::SimpleTable->new([5, 'Foo'], [10, 'Bar']);
37           $t3->row('foobarbaz', 'yadayadayada');
38           $t3->hr;
39           $t3->row('barbarbarbarbar', 'yada');
40           print $t3->draw;
41
42           .-------+------------.
43           | Foo   | Bar        |
44           +-------+------------+
45           | foob- | yadayaday- |
46           | arbaz | ada        |
47           +-------+------------+
48           | barb- | yada       |
49           | arba- |            |
50           | rbar- |            |
51           | bar   |            |
52           '-------+------------'
53

DESCRIPTION

55       Simple eyecandy ASCII tables.
56

METHODS

58       Text::SimpleTable implements the following methods.
59
60   "new"
61           my $t = Text::SimpleTable->new(5, 10);
62           my $t = Text::SimpleTable->new([5, 'Col1', 10, 'Col2']);
63
64   "draw"
65           my $ascii = $t->draw;
66
67   "hr"
68           $t = $t->hr;
69
70   "row"
71           $t = $t->row('col1 data', 'col2 data');
72

AUTHOR

74       Sebastian Riedel, "sri@cpan.org".
75

MAINTAINER

77       Marcus Ramberg "mramberg@cpan.org".
78

CREDITS

80       In alphabetical order:
81
82       Brian Cassidy
83
85       Copyright (C) 2005-2010, Sebastian Riedel.
86
87       This program is free software, you can redistribute it and/or modify it
88       under the terms of the Artistic License version 2.0.
89
90
91
92perl v5.12.0                      2010-03-11              Text::SimpleTable(3)
Impressum