for my $table_name ( @tables ) {
my $tdata = $result->{tables}{ $table_name };
- my $table = Table->new({ name => $tdata->{table_name} });
+ my $table = Table->new({ name => $tdata->{table_name}, schema => $schema });
$schema->add_table($table);
$table->extra(temporary => 1) if $tdata->{'temporary'};
$table->comments( $tdata->{'comments'} );
- my @fields =
-sort { $tdata->{'fields'}{ $a }{'order'} <=> $tdata->{'fields'}{ $b }{'order'} }
- keys %{ $tdata->{'fields'} };
+ my @fields = sort { $tdata->{'fields'}{ $a }{'order'} <=> $tdata->{'fields'}{ $b }{'order'} } keys %{ $tdata->{'fields'} };
for my $fname ( @fields ) {
my $fdata = $tdata->{'fields'}{ $fname };