NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
As seen in Catalyst (Score:1)
Text::SimpleTable [cpan.org]?
Re: (Score:2)
Never saw that module before. I don't understand why it requires that I pass in the width when the calculation is trivial. Sometimes module interfaces mystify me.
Also nice... (Score:1)
Text::TabularDisplay (Score:1)
(darren)
Re: (Score:1)
Well, Text::SimpleTable is clearly more Table 2.0, what with the rounded corners and everything.
Re: (Score:1)
(darren)
cryptic? (Score:1)
Have fun reading the docs to figure that out :)
I'm skeptical. I admit to having ever used Text::Table before, but not much, and it didn't take more than a glance at the docs to figure out how to do what you want:
my $t = Text::Table->new(\'| ', 'Time', \' | ', 'Text', \' |'); ...);$t->load(... some data
my $rule = $t->rule(qw(- +));
print $rule, $t->head, $rule, $t->body, $rule;
I'm not claiming to be overly fond of the interface -- any time I have to do \'foo' it trips my fingers up -- but I've read documentation that's far worse
Wow! (Score:1)
All these table formatters. I never knew. I just use the 'format' built-in.
man perlform
Perhaps I should investigate them, because I don't know how to write argument lines to 'format' that match the number of values in an array. The number of values is variable. The argument lines are fixed.
Perhaps I should declare different formats for each of the possible number of values, because I have only a small number of different possible numbers of values.
Text::FormatTable (Score:1)
a| b c
=================
this a| oh, yep
test,| cool,
a nice| a
test| test!
------+----------
you| yes, z
mean| it
it's| is.
really|
a|
test?|
=================