The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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

 use strict;
 use warnings;

 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

Lightweight Routing Framework

Map::Tube::Text::Table

Table output for Map::Tube

Task::Map::Tube

Install the Map::Tube modules.

REPOSITORY

https://github.com/michal-josef-spacek/Map-Tube-Text-Table

AUTHOR

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

http://skim.cz

LICENSE AND COPYRIGHT

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

VERSION

0.05