Table::Simple::Output - generates ASCII output for an Table::Simple object
This class generates the ASCII table output for a Table::Simple object. The output functionality was split to make subclassing easier.
This attribute is the character to mark the beginning or end of a column. The default is ":"
This attribute is the character to mark horizontal lines in the table. The default is "="
This attribute is the character marking the intersection between the column marker and a horizontal rule. The default is "+"
This attribute defines the amount of spaces to put around data rows. The default is 1 space.
This attribute is required at construction time. It is the table to be output. It must be an object of type Table::Simple.
This method takes a text string and a width and centers the text in the width given. It returns the text string padded with spaces to put the text in the middle of the width.
This puts text against the left margin of a table cell, padded with spaces until it is the specified width.
This method puts text against the right margin of a table cell, padded with spaces until it is the specified width.
This method returns a scalar string composed of the rows specified in the input @array.
This method returns a string scalar composed of column names centered in the width for each column.
This outputs the Table::Simple name attribute centered in its own row. It returns a string scalar.
This method returns a string scalar composed of the table name row (if defined), column names, and all row values.
This method outputs the string scalar from the build_table_output() method to standard out.
Copyright (C) 2010 Mark Allen
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Mark Allen <mrallen1@yahoo.com>
Moose, Table::Simple, Table::Simple::Output::Theory
To install Table::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Table::Simple
CPAN shell
perl -MCPAN -e shell install Table::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.