Creighton Higgins > Text-Table-Tiny > Text::Table::Tiny

Download:
Text-Table-Tiny-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Text::Table::Tiny - makes simple tables from two-dimensional arrays, with limited templating options

VERSION ^

version 0.03

OPTIONS ^

SYNOPSIS ^

    use Text::Table::Tiny;
    my $rows = [
        # header row
        ['Name', 'Rank', 'Serial'],
        # rows
        ['alice', 'pvt', '123456'],
        ['bob',   'cpl', '98765321'],
        ['carol', 'brig gen', '8745'],
    ];
    # separate rows puts lines between rows, header_row says that the first row is headers
    print Text::Table::Tiny::table(rows => $rows, separate_rows => 1, header_row => 1);

  Example in the synopsis: Text::Table::Tiny::table(rows => $rows);

    +-------+----------+----------+
    | Name  | Rank     | Serial   |
    | alice | pvt      | 123456   |
    | bob   | cpl      | 98765321 |
    | carol | brig gen | 8745     |
    +-------+----------+----------+

  with header_row: Text::Table::Tiny::table(rows => $rows, header_row => 1);

    +-------+----------+----------+
    | Name  | Rank     | Serial   |
    +-------+----------+----------+
    | alice | pvt      | 123456   |
    | bob   | cpl      | 98765321 |
    | carol | brig gen | 8745     |
    +-------+----------+----------+

  with header_row and separate_rows: Text::Table::Tiny::table(rows => $rows, header_row => 1, separate_rows => 1);

    +-------+----------+----------+
    | Name  | Rank     | Serial   |
    O=======O==========O==========O
    | alice | pvt      | 123456   |
    +-------+----------+----------+
    | bob   | cpl      | 98765321 |
    +-------+----------+----------+
    | carol | brig gen | 8745     |
    +-------+----------+----------+

FORMAT VARIABLES ^

AUTHOR ^

Creighton Higgins <chiggins@chiggins.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Creighton Higgins.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: