Commit 8d5a0bce authored by Chad Granum's avatar Chad Granum

Regen some files

parent d27ff5a9
This software is copyright (c) 2017 by Chad Granum.
This software is copyright (c) 2018 by Chad Granum.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2017 by Chad Granum.
This software is Copyright (c) 2018 by Chad Granum.
This is free software, licensed under:
......@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2017 by Chad Granum.
This software is Copyright (c) 2018 by Chad Granum.
This is free software, licensed under:
......
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009.
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
use strict;
use warnings;
......
......@@ -13,12 +13,15 @@ SYNOPSIS
use Term::Table;
my $table = Term::Table->new(
max_width => 80, # defaults to terminal size
collapse => 1, # do not show empty columns
header => [ 'name', 'age', 'hair color' ],
rows => [
[ 'Fred Flinstone', 2000000, 'black' ],
[ 'Wilma Flinstone', 1999995, 'red' ],
max_width => 80, # defaults to terminal size
pad => 4, # Extra padding between table and max-width (defaults to 4)
allow_overflow => 0, # default is 0, when off an exception will be thrown if the table is too big
collapse => 1, # do not show empty columns
header => ['name', 'age', 'hair color'],
rows => [
['Fred Flinstone', 2000000, 'black'],
['Wilma Flinstone', 1999995, 'red'],
...
],
);
......@@ -64,6 +67,19 @@ INTERFACE
find the width of your terminal and use that, otherwise it falls back
to the terminal width or 80.
pad => $num
Defaults to 4, extra padding for row width calculations. Default is
for legacy support. Set this to 0 to turn padding off.
allow_overflow => $bool
Defaults to 0. If this is off then an exception will be thrown if the
table cannot be made to fit inside the max-width. If this is set to 1
then the table will be rendered anyway, larger than max-width, if it
is not possible to stay within the max-width. In other words this
turns max-width from a hard-limit to a soft recommendation.
sanitize => $bool
This will sanitize all the data in the table such that newlines,
......
......@@ -12,12 +12,15 @@ wrong. This module is able to generic format rows of data into tables.
use Term::Table;
my $table = Term::Table->new(
max_width => 80, # defaults to terminal size
collapse => 1, # do not show empty columns
header => [ 'name', 'age', 'hair color' ],
rows => [
[ 'Fred Flinstone', 2000000, 'black' ],
[ 'Wilma Flinstone', 1999995, 'red' ],
max_width => 80, # defaults to terminal size
pad => 4, # Extra padding between table and max-width (defaults to 4)
allow_overflow => 0, # default is 0, when off an exception will be thrown if the table is too big
collapse => 1, # do not show empty columns
header => ['name', 'age', 'hair color'],
rows => [
['Fred Flinstone', 2000000, 'black'],
['Wilma Flinstone', 1999995, 'red'],
...
],
);
......@@ -61,6 +64,19 @@ This prints a table like this:
be no bigger. If none is specified it will attempt to find the width of your
terminal and use that, otherwise it falls back to the terminal width or `80`.
- pad => $num
Defaults to 4, extra padding for row width calculations. Default is for legacy
support. Set this to 0 to turn padding off.
- allow\_overflow => $bool
Defaults to 0. If this is off then an exception will be thrown if the table
cannot be made to fit inside the max-width. If this is set to 1 then the table
will be rendered anyway, larger than max-width, if it is not possible to stay
within the max-width. In other words this turns max-width from a hard-limit to
a soft recommendation.
- sanitize => $bool
This will sanitize all the data in the table such that newlines, control
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment