Check truth of preserve_case not definedness
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Informix.pm
index bb7a148..b59eead 100644 (file)
@@ -10,7 +10,7 @@ use Try::Tiny;
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table::Informix ();
 
-our $VERSION = '0.07011';
+our $VERSION = '0.07022';
 
 =head1 NAME
 
@@ -65,7 +65,7 @@ sub _setup {
 
     $self->next::method(@_);
 
-    if (not defined $self->preserve_case) {
+    if (not $self->preserve_case) {
         $self->preserve_case(0);
     }
     elsif ($self->preserve_case) {
@@ -240,7 +240,7 @@ EOF
 sub _idx_colnames {
     my ($self, $idx_info, $table_cols_by_colno) = @_;
 
-    return [ map $self->_lc($table_cols_by_colno->{$_}), grep $_, map $idx_info->{$_}, map "part$_", (1..16) ];
+    return [ map $table_cols_by_colno->{$_}, grep $_, map $idx_info->{$_}, map "part$_", (1..16) ];
 }
 
 sub _colnames_by_colno {
@@ -259,7 +259,7 @@ WHERE t.tabname = ?
 EOF
     $sth->execute($table);
     my $cols = $sth->fetchall_hashref('colno');
-    $cols = { map +($_, $cols->{$_}{colname}), keys %$cols };
+    $cols = { map +($_, $self->_lc($cols->{$_}{colname})), keys %$cols };
 
     return $cols;
 }
@@ -464,7 +464,7 @@ EOF
 #        if (lc($data_type) eq 'varchar') {
 #            $result->{$col}{size}[1] = $info->{colmin};
 #        }
-       
+
         my ($default_type, $default) = @{$info}{qw/deflt_type deflt/};
 
         next unless $default_type;