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

NAME

Games::Lacuna::Task::Table - Simple table for reports

SYNOPSIS

    my $table = Games::Lacuna::Task::Table->new(
        headline    => 'Some table',
        columns     => ['Column 1','Column 2'],
    );
    
    foreach (@data) {
        $table->add_row({
            column_1    => $_->[0],
            column_2    => $_->[1],
        });
    }
    
    say $table->render_text;

ACCESSORS

headline

Headline. [Optional]

columns

Array of column names. [Required]

data

Array of HashRefs. Usually not accessed directly.

METHODS

render_html

Render table as HTML.

render_text

Render table as plain text.

has_headline

Checks if headline is set

add_row

Add a new row.