++ed by:

2 non-PAUSE users.

Alex Skud Bayley


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:


True or false depending on whether you want your table to have a border. Defaults to true (1).


Reference to your hash


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".


Either 'asc' or 'desc' depending on whether you want your sorting to be in ascending or descending order. Defaults to "asc".


Kirrily "Skud" Robert <skud@cpan.org>



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'