- Removed use of $Revision$ SVN keyword to generate VERSION variables; now sub-module...
[dbsrgits/SQL-Translator.git] / bin / sqlt.cgi
index 51ba210..c6d89fe 100755 (executable)
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 
 # -------------------------------------------------------------------
-# $Id: sqlt.cgi,v 1.2 2003-08-27 04:01:14 kycl4rk Exp $
+# $Id$
 # -------------------------------------------------------------------
-# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
+# Copyright (C) 2002-2009 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
@@ -38,9 +38,6 @@ use strict;
 use CGI;
 use SQL::Translator;
 
-use vars '$VERSION';
-$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/;
-
 my $q = CGI->new;
 
 eval {
@@ -60,7 +57,7 @@ eval {
             ? $q->param('diagram_output_type')
             : $producer eq 'GraphViz'
             ? $q->param('graphviz_output_type') 
-            : 'png'
+            : ''
         ;
 
         my $t                    =  SQL::Translator->new( 
@@ -110,6 +107,9 @@ eval {
         elsif ( $output_type eq 'ps' ) {
             $text_type = 'postscript';
         }
+        elsif ( $producer eq 'HTML' ) {
+            $text_type = 'html';
+        }
 
         my $header_type = $image_type ? "image/$image_type" : "text/$text_type";
 
@@ -544,10 +544,11 @@ sub show_form {
 
 =head1 AUTHOR
 
-Ken Y. Clark E<lt>kclark@cpan.orgE<gt>
+Ken Y. Clark E<lt>kclark@cpan.orgE<gt>.
 
 =head1 SEE ALSO
 
-perl, SQL::Translator.
+L<perl>,
+L<SQL::Translator>
 
 =cut