NAME

Map::Tube::Text::Table::Utils - Utilities for Map::Tube::Text::Table.

SYNOPSIS

use Map::Tube::Text::Table::Utils qw(table);
my $table = table($title, $data_len_ar, $header_ar, $data_ar);

SUBROUTINES

table($title, $data_len_ar, $header_ar, $data_ar)
Print table.
Returns text.

EXAMPLE1

# Pragmas.
use strict;
use warnings;

# Module.
use Encode qw(encode_utf8);
use Map::Tube::Text::Table::Utils qw(table);

# Get table.
my $table = table('Title', [1, 2, 3], ['A', 'BB', 'CCC'], [
        ['E', 'A', 'A'],
        ['A', 'Ga', 'Acv'],
]);

# Print table.
print encode_utf8($table);

# Output:
# ┌───────────┐
# │ Title     │
# ├──┬───┬────┤
# │ A│ BB│ CCC│
# ├──┼───┼────┤
# │ E│ A │ A  │
# │ A│ Ga│ Acv│
# └──┴───┴────┘

DEPENDENCIES

Exporter, List::Util, Readonly, Text::UnicodeBox, Text::UnicodeBox::Control.

SEE ALSO

Map::Tube, Map::Tube::Text::Table.

REPOSITORY

https://github.com/tupinek/Map-Tube-Text-Table

AUTHOR

Michal Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2014 Michal Špaček
Artistic License
BSD 2-Clause License

VERSION

0.01