@tables = grep { /$constraint/ } @$tables if defined $constraint;
@tables = grep { ! /$exclude/ } @$tables if defined $exclude;
- for my $table (@tables) {
+ LOOP: for my $table (@tables) {
try {
my $sth = $self->_sth_for($table, undef, \'1 = 0');
$sth->execute;
catch {
warn "Bad table or view '$table', ignoring: $_\n";
$self->_unregister_source_for_table($table);
+ no warnings 'exiting';
+ next LOOP;
};
push @filtered_tables, $table;
my $sth = $self->_sth_for($table, undef, \'1 = 0');
$sth->execute;
- my @columns = $sth->{NAME};
+ my @columns = @{ $sth->{NAME} };
for my $i (0 .. $#columns) {
my $column_info = {};