|
C |
HTML::HashTable - Create an HTML table from a Perl hash
use HTML::HashTable;
print tablify({
BORDER => 0,
DATA => $myhashref,
SORTBY => 'key',
ORDER => 'desc'}
);
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:
BORDERDATASORTBYORDER
Kirrily ``Skud'' Robert <skud@cpan.org>
|
C |