in reply to Re: CGI.pm HTML-Generation Methods Considered Useful
in thread CGI.pm HTML-Generation Methods Considered Useful
my @colors = ( '#dddddd', '#eeeeee' ); $html .= $q->table( { -bgcolor => '#ffffff', -border => 1 }, $q->caption('Status Summary'), # beware beautiful nested maps ahead map { my $k = $_; $q->Tr( { -bgcolor => (push @colors, shift @colors) && $colors[0] }, $q->td( $k ), map { $q->td( $data->{$k}{$_} eq 'bad' ? { -bgcolor => '#ff0000' } : { -bgcolor => '#ffffff' }, $data->{$k}{$_} ) } sort keys %{ $data->{$k} } ) } sort keys %{ $data } );
There is no particularly good reason to do this. After this, it's just for fun. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CGI.pm HTML-Generation Methods Considered Useful
by tachyon (Chancellor) on Jul 10, 2004 at 12:06 UTC | |
by merlyn (Sage) on Jul 10, 2004 at 19:31 UTC | |
by friedo (Prior) on Jul 10, 2004 at 13:39 UTC |