From: Simon Cozens Date: Mon, 21 Jun 2004 13:22:47 +0000 (+0000) Subject: Fixes #6571 User-defined ok_tables: patch X-Git-Tag: 2.10~211 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0e912abe61e5c246fc35dce5b9cbe753d23ab416;p=maypole.git Fixes #6571 User-defined ok_tables: patch git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@151 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Maypole.pm b/lib/Maypole.pm index ace9776..dd9b4c8 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -88,7 +88,9 @@ sub handler_guts { sub is_applicable { my $self = shift; my $config = $self->config; - $config->{ok_tables} = {map {$_ => 1} @{$config->{display_tables}}}; + $config->{ok_tables} ||= $config->{display_tables}; + $config->{ok_tables} = {map {$_=>1} @{$config->{ok_tables}}} + if ref $config->{ok_tables} eq "ARRAY"; warn "We don't have that table ($self->{table})" if $self->debug and not $config->{ok_tables}{$self->{table}}; return DECLINED() unless exists $config->{ok_tables}{$self->{table}};