Text::...leTable(3pm)
β¨ NAME β¨
Text::SimpleTable β Simple Eyecandy ASCII Tables π
okay bestie, this is the Text::SimpleTable page from the User Contributed Perl Documentation, and it's literally the cutest way to make ASCII tables. no cap.
πΈ SYNOPSIS πΈ
use Text::SimpleTable;
my $t1 = Text::SimpleTable->new(5, 10);
$t1->row('foobarbaz', 'yadayadayada');
print $t1->draw;
.-------+------------.
| foob- | yadayaday- |
| arbaz | ada |
'-------+------------'
my $t2 = Text::SimpleTable->new([5, 'Foo'], [10, 'Bar']);
$t2->row('foobarbaz', 'yadayadayada');
$t2->row('barbarbarbarbar', 'yada');
print $t2->draw;
.-------+------------.
| Foo | Bar |
+-------+------------+
| foob- | yadayaday- |
| arbaz | ada |
| barb- | yada |
| arba- | |
| rbar- | |
| bar | |
'-------+------------'
my $t3 = Text::SimpleTable->new([5, 'Foo'], [10, 'Bar']);
$t3->row('foobarbaz', 'yadayadayada');
$t3->hr;
$t3->row('barbarbarbarbar', 'yada');
print $t3->draw;
.-------+------------.
| Foo | Bar |
+-------+------------+
| foob- | yadayaday- |
| arbaz | ada |
+-------+------------+
| barb- | yada |
| arba- | |
| rbar- | |
| bar | |
'-------+------------'
print $t3->boxes->draw;
βββββββββ¬βββββββββββββ
β Foo β Bar β
βββββββββΌβββββββββββββ€
β foob- β yadayaday- β
β arbaz β ada β
βββββββββΌβββββββββββββ€
β barb- β yada β
β arba- β β
β rbar- β β
β bar β β
βββββββββ΄βββββββββββββ
likeβ¦ the last one?? the unicode boxes?? it's giving main character energy fr fr π
π¦ DESCRIPTION π¦
Simple eyecandy ASCII tables. that's it, that's the vibe. eyecandy, literally. β¨
π METHODS π
Text::SimpleTable implements the following methods. slay.
π new
my $t = Text::SimpleTable->new(5, 10);
my $t = Text::SimpleTable->new([5, 'Col1', 10, 'Col2']);
π draw
my $ascii = $t->draw;
π hr
$t = $t->hr;
π row
$t = $t->row('col1 data', 'col2 data');
π boxes
$t = $t->boxes;
boxes switches the output generated by draw to use the unicode box drawing characters. The last example above may not render nicely on some devices. π
heads up bestie: those pretty box-drawing glyphs are not guaranteed to look right everywhere β some devices just fumble them. it's giving tragic, but that's what the docs say. π«Ά
π AUTHOR π
Sebastian Riedel, sri@cpan.org. iconic. π
π MAINTAINER π
Marcus Ramberg mramberg@cpan.org. keeping the dream alive, we love to see it. π«Ά
β CREDITS β
In alphabetical order:
- Brian Cassidy
π COPYRIGHT AND LICENSE π
Copyright (C) 2005-2010, Sebastian Riedel.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. periodt. π
and that's a wrap on the Text::SimpleTable(3pm) page, bestie!! this one came from perl v5.26.2, dated 2018-07-27 πΈ β go forth and make ur terminal pretty, ily, bye!! πβ¨π¦
π¦ where this page comes from
- debian bookworm: libtext-simpletable-perl 2.07-1 Β· Artistic-2.0
- debian trixie: libtext-simpletable-perl 2.07-1 Β· Artistic-2.0
- ubuntu jammy: libtext-simpletable-perl 2.07-1 Β· Artistic-2.0
- ubuntu noble: libtext-simpletable-perl 2.07-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms