From: Ken Youens-Clark Date: Sat, 3 May 2003 15:17:23 +0000 (+0000) Subject: Fixed error 'Use of uninitialized value in string eq at blib/lib/SQL/Translator/Produ... X-Git-Tag: v0.02~151 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c32785b80fceff42ba37b573e49921685121dec;p=dbsrgits%2FSQL-Translator.git Fixed error 'Use of uninitialized value in string eq at blib/lib/SQL/Translator/Producer/MySQL.pm line 164.' --- diff --git a/lib/SQL/Translator/Producer/MySQL.pm b/lib/SQL/Translator/Producer/MySQL.pm index 6408d3a..0f42d18 100644 --- a/lib/SQL/Translator/Producer/MySQL.pm +++ b/lib/SQL/Translator/Producer/MySQL.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::MySQL; # ------------------------------------------------------------------- -# $Id: MySQL.pm,v 1.17 2003-04-25 11:47:25 dlc Exp $ +# $Id: MySQL.pm,v 1.18 2003-05-03 15:17:23 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -24,7 +24,7 @@ package SQL::Translator::Producer::MySQL; use strict; use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.18 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -161,6 +161,7 @@ sub produce { for my $key ( @indices, @constraints ) { my ($name, $type, $fields) = @{ $key }{ qw[ name type fields ] }; $name ||= ''; + $type ||= ''; my $index_type = $type eq 'primary_key' ? 'PRIMARY KEY' : $type eq 'unique' ? 'UNIQUE KEY' :