NAME
HTML::HashTable
- Create an HTML table from a Perl hash
SYNOPSIS
use HTML::HashTable;
print tablify({
BORDER => 0,
DATA => $myhashref,
SORTBY => 'key',
ORDER => 'desc'}
);
DESCRIPTION
This module takes an arbitrary Perl hash and presents it as an HTML table. The hash can contain anything you want -- scalar data, arrayrefs, hashrefs, whatever. Yes, this means you can use a tied hash if you wish.
The HTML produced is nicely formatted and indented, suitable for human editing and manipulation.
Some options are provided with the tablify() function to allow you to specify whether you wish to have a border or not, and whether you wish your table to be sorted by key or value (but note that sorting by value gives almost meaningless results if your values are references, as in a deeply nested Perl data structure.)
The options given to the tablify() function are:
BORDER
-
True or false depending on whether you want your table to have a border. Defaults to true (1).
DATA
-
Reference to your hash
SORTBY
-
Either 'key' or 'value' depending on how you want your data sorted. Note that sorting by value is more or less meaningless if your values are references (as in a deeply nested data structure). Defaults to "key".
ORDER
-
Either 'asc' or 'desc' depending on whether you want your sorting to be in ascending or descending order. Defaults to "asc".
AUTHOR
Kirrily "Skud" Robert <skud@cpan.org>
SEE ALSO
perl.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 55:
'=item' outside of any '=over'
- Around line 185:
You forgot a '=back' before '=head1'