Remove copyright headers from individual scripts
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / HTML.pm
index 3a6c593..f35eb3c 100644 (file)
@@ -1,31 +1,12 @@
 package SQL::Translator::Producer::HTML;
 
-# -------------------------------------------------------------------
-# $Id: HTML.pm,v 1.13 2004-02-11 21:54:39 kycl4rk Exp $
-# -------------------------------------------------------------------
-# Copyright (C) 2002-4 SQLFairy Authors
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307  USA
-# -------------------------------------------------------------------
-
 use strict;
 use Data::Dumper;
 use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME);
 
-$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/;
-$NAME = join ', ', __PACKAGE__, $VERSION;
+$VERSION = '1.59';
+
+$NAME = __PACKAGE__;
 $NOWRAP = 0 unless defined $NOWRAP;
 $NOLINKTABLE = 0 unless defined $NOLINKTABLE;
 
@@ -95,7 +76,7 @@ sub produce {
                 ),
             );
 
-        for my $table (sort @table_names) {
+        for my $table (@table_names) {
             my $table_name = $table->name;
             push @html, 
                 $q->comment("Start link to table '$table_name'"),
@@ -150,6 +131,7 @@ sub produce {
                     ) 
                 );
 
+        my $i = 0;
         for my $field ( @fields ) {
             my $name      = $field->name      || '';
                $name      = qq[<a name="$table_name-$name">$name</a>];
@@ -173,8 +155,10 @@ sub produce {
             push @other, 'UNIQUE'      if $field->is_unique;
             push @other, 'NOT NULL'    unless $field->is_nullable;
             push @other, $comment      if $comment;
+            my $class = $i++ % 2 ? 'even' : 'odd';
             push @html,
                 $q->Tr(
+                    { -class => "tr-$class" },
                     $q->td({ -class => "FieldCellName" }, $name),
                     $q->td({ -class => "FieldCellType" }, $data_type),
                     $q->td({ -class => "FieldCellSize" }, $size),
@@ -330,7 +314,7 @@ insignificant whitespace and be generally smaller.
 
 =head1 AUTHORS
 
-Ken Y. Clark E<lt>kclark@cpan.orgE<gt>,
+Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>,
 Darren Chamberlain E<lt>darren@cpan.orgE<gt>.
 
 =cut