- warn "We don't have that table ($table).\n"
- . "Available tables are: "
- . join( ",", @{ $config->ok_tables } )
- if $self->debug
- and not $config->ok_tables->{$table}
- and $self->action; # this is probably always true
-
- return DECLINED unless exists $config->ok_tables->{$table};
-
- my $path_is_ok = 0;
- if (exists $config->ok_tables->{ $self->{table} }) {
- $path_is_ok = 1;
- } else {
- if ( $self->_have_default_table_view ) {
- my $path_is_ok = $self->default_table_view($self->{path},$self->{args});
- }
- unless ($path_is_ok) {
- warn "We don't have that table ($self->{table}).\n"
- . "Available tables are: "
- . join( ",", @{ $config->{display_tables} } )
- if $self->debug
- and not $config->ok_tables->{ $self->{table} }
- and $self->{action};
- }
+ my $ok = 0;
+
+ if (exists $ok_tables->{$table})
+ {
+ $ok = 1;
+ }
+# implements tj's default_table_view(), but there's no _default_table_view()
+# or _have_default_table_view() yet
+# else
+# {
+# $ok = $self->default_table_view($self->path, $self->args)
+# if $self->_have_default_table_view;
+# }
+
+ if (not $ok)
+ {
+ warn "We don't have that table ($table).\n"
+ . "Available tables are: "
+ . join( ",", keys %$ok_tables )
+ if $self->debug and not $ok_tables->{$table};
+
+ return 0;