Shut up uninitialized warnings from ->table_info on DB2
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / DB2.pm
index 6d2c9ad..5c1296a 100644 (file)
@@ -13,7 +13,7 @@ use namespace::clean;
 
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07038';
+our $VERSION = '0.07042';
 
 =head1 NAME
 
@@ -75,7 +75,7 @@ EOF
         my ($col, $constname, $seq) = @$row;
         push(@{$keydata{$constname}}, [ $seq, $self->_lc($col) ]);
     }
-    foreach my $keyname (keys %keydata) {
+    foreach my $keyname (sort keys %keydata) {
         my @ordered_cols = map { $_->[1] } sort { $a->[0] <=> $b->[0] }
             @{$keydata{$keyname}};
         push(@uniqs, [ $keyname => \@ordered_cols ]);
@@ -162,6 +162,14 @@ sub _dbh_tables {
     return $self->dbh->tables($schema ? { TABLE_SCHEM => $schema, TABLE_NAME => '%' } : undef);
 }
 
+sub _dbh_table_info {
+    my $self = shift;
+
+    local $^W = 0; # shut up undef warning from DBD::DB2
+
+    $self->next::method(@_);
+}
+
 sub _columns_info_for {
     my $self = shift;
     my ($table) = @_;