This example data causes the frobnitz process to break:
| ID | Field 1 | Field 2 | expected | received |
|---|---|---|---|---|
| id_1 | data 1 1 | data 1 2 | Foo | Bar |
And an implementation of an output formatter based on Text::Table.
use strict;
use warnings;
use Text::Table;
# Note that for GHFM, tables need a minimum of three characters somewhere in the column
my @headers = ("ID ", "FOO", "BAR" );
my @data = ( [1..3], [4..6], [7..9] );
my $formatter = Text::Table->new( \"|", map { ( $_, \"|" ) } @headers );
$formatter->load( @data );
print $formatter->title, $formatter->rule( "-", "|" ), $formatter->body;| ID | FOO | BAR |
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |