From: Ken Youens-Clark Date: Thu, 6 Nov 2003 16:54:43 +0000 (+0000) Subject: If no data is present, then assign a field size of "1" and not "0" (as the X-Git-Tag: v0.04~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9979410c38b222f1d6e384e40034547e705b773d;p=dbsrgits%2FSQL-Translator.git If no data is present, then assign a field size of "1" and not "0" (as the latter isn't valid). --- diff --git a/lib/SQL/Translator/Parser/Excel.pm b/lib/SQL/Translator/Parser/Excel.pm index 8338353..9ba1f99 100644 --- a/lib/SQL/Translator/Parser/Excel.pm +++ b/lib/SQL/Translator/Parser/Excel.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::Excel; # ------------------------------------------------------------------- -# $Id: Excel.pm,v 1.12 2003-11-06 02:07:56 kycl4rk Exp $ +# $Id: Excel.pm,v 1.13 2003-11-06 16:54:43 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -54,7 +54,7 @@ and field sizes. True by default. use strict; use vars qw($DEBUG $VERSION @EXPORT_OK); $DEBUG = 0 unless defined $DEBUG; -$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; use Spreadsheet::ParseExcel; use Exporter; @@ -176,7 +176,7 @@ sub parse { } for my $field ( keys %field_info ) { - my $size = $field_info{ $field }{'size'} || [ 0 ]; + my $size = $field_info{ $field }{'size'} || [ 1 ]; my $data_type = $field_info{ $field }{'char'} ? 'char' : $field_info{ $field }{'float'} ? 'float' :