From: Rafael Kitover Date: Fri, 30 Apr 2010 13:10:42 +0000 (-0400) Subject: fix another Informix default parsing bug X-Git-Tag: 0.07000~45 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25e1e7bfd04b153c06f73260d7579fbc3093aec3;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix another Informix default parsing bug --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm index 01ca076..0f1c3d7 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm @@ -200,7 +200,8 @@ EOF } else { $default = (split ' ', $default, 2)[-1]; - $default =~ s/\s+\z//; + + $default =~ s/\s+\z// if looks_like_number $default; # remove trailing 0s in floating point defaults $default =~ s/0+\z// if $default =~ /^\d+\.\d+\z/;