Text::...leTable(3pm)

πŸ“¦
version 2.07 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ 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 (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