DBIx-HTML

 view release on metacpan or  search on metacpan

lib/DBIx/HTML.pm  view on Meta::CPAN

1;
__END__
=head1 NAME

DBIx::HTML - Just another HTML table generating DBI extension.

=head1 SYNOPSIS

    use DBIx::HTML;

    my $generator = DBIx::HTML->connect( @db_credentials );
    $generator->do( $query );

    # supports multiple orientations
    print $generator->portrait;
    print $generator->landscape;

    # stackable method calls:
    print DBIx::HTML
        ->connect( @db_credentials )
        ->do( 'select foo,baz from bar' )
        ->landscape
    ;

    # rotating attributes:
    print $generator->portrait( tr => { class => [qw( odd even )] } );

=head1 DESCRIPTION

Generate HTML tables from database queries (HTML4, XHTML and HTML5).

lib/DBIx/HTML.pm  view on Meta::CPAN

  print $generator->portrait( headings => sub { uc shift } );

This module uses Spreadsheet::HTML to generate the tables. See
L<Spreadsheet::HTML> for further documentation on customizing
the table output.

=head1 METHODS

=over 4

=item C<connect( @database_credentials )>

Connects to the database. See L<DBI> for how to do that.
Optionally, create your own database handle and pass it:

  my $dbh = DBI->connect ( @db_creds );
  my $generator = DBIx::HTML->connect( $dbh );

  # do stuff and then finally ...
  $dbh->disconnect;

readme.md  view on Meta::CPAN


See [DBIx::HTML](http://search.cpan.org/dist/DBIx-HTML/)
and [Spreadsheet::HTML](http://search.cpan.org/dist/Spreadsheet-HTML/)
for more information.

Synopsis
--------
```perl
use DBIx::HTML;

my $generator = DBIx::HTML->connect( @db_credentials );
$generator->do( $query );

# supports multiple orientations
print $generator->portrait;
print $generator->landscape;

# stackable method calls:
print DBIx::HTML
    ->connect( @db_credentials )
    ->do( 'select foo,baz from bar' )
    ->landscape
;

# rotating attributes:
print $generator->portrait( tr => { class => [qw( odd even )] } );
```

Installation
------------



( run in 0.232 second using v1.01-cache-2.11-cpan-4d50c553e7e )