The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TextTable - Create Text::Table

SYNOPSIS

 use App::PerlShell::AddOn::TextTable;

DESCRIPTION

This module implements table creation with Text::Table.

COMMANDS

TextTable - provide help

Provides help.

METHODS

texttable - create table object

 [$table =] texttable [OPTIONS];

Create Text::Table object. See Text::Table for OPTIONS.

cols - load table by columns

 $table->cols([array],[...]);

Load table by columns. Array references provided will make up the columns of the Text::Table table.

rows - load table by rows

 $table->rows([array],[...]);

Load table by rows. Array references provided will make up the rows of the Text::Table table.

EXAMPLES

Simple Usage

  use App::PerlShell::AddOn::TextTable;
  @a1 = qw (1 1);
  @a2 = qw (2 2);

  $table = texttable("One", "Two");
  $table->cols(\@a1,\@a2);
  print $table;

Perl Packet Crafter [...] use PPC::Plugin::Trace; $t = trace 'www.google.com';

  use App::PerlShell::AddOn::TextTable;
  $table = texttable("Sent\nTTL", "IP Addr", "Time", "Recv\nTTL");
  $table->cols(
      [ map { [$_->layers]->[1]->ttl } $t->sent ],
      [ map { [$_->layers]->[1]->src } $t->recv ],
      [ $t->time ],
      [ map { [$_->layers]->[1]->ttl } $t->recv ]
  );
  print $table;

SEE ALSO

Text::Table Array::Transpose

LICENSE

This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.

AUTHOR

Copyright (c) 2013, 2016 Michael Vincent

http://www.VinsWorld.com

All rights reserved