]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
fixed display_tables bug
[maypole.git] / lib / Maypole.pm
index 88110eabb487ea6d4e1e47693a5787b519a3bdcd..cfba49e6ee114feffb3bfd2cd80363a44f3f3181 100644 (file)
@@ -1,13 +1,12 @@
 package Maypole;
 use base qw(Class::Accessor::Fast Class::Data::Inheritable);
-use attributes ();
 use UNIVERSAL::require;
 use strict;
 use warnings;
 use Maypole::Config;
 use Maypole::Constants;
 
-our $VERSION = '2.0';
+our $VERSION = '2.03';
 
 __PACKAGE__->mk_classdata($_) for qw( config init_done view_object );
 __PACKAGE__->mk_accessors(
@@ -49,7 +48,7 @@ sub init {
     $config->view->require;
     die "Couldn't load the view class " . $config->view . ": $@" if $@;
     $config->display_tables
-      || $config->display_tables( [ $class->config->tables ] );
+      || $config->display_tables( $class->config->tables );
     $class->view_object( $class->config->view->new );
     $class->init_done(1);
 
@@ -63,7 +62,6 @@ sub handler {
     my $r = bless { config => $class->config }, $class;
     $r->get_request($req);
     $r->parse_location();
-    warn "Request path: $r->{path}" if $r->debug;
     my $status = $r->handler_guts();
     return $status unless $status == OK;
     $r->send_output;
@@ -135,7 +133,8 @@ sub is_applicable {
       . "Available tables are: "
       . join( ",", @{ $config->{display_tables} } )
       if $self->debug
-      and not $config->ok_tables->{ $self->{table} };
+      and not $config->ok_tables->{ $self->{table} }
+      and $self->{action};
     return DECLINED() unless exists $config->ok_tables->{ $self->{table} };
 
     # Is it public?
@@ -442,8 +441,8 @@ Simon Cozens, C<simon@cpan.org>
 =head1 THANKS TO
 
 Danijel Milicevic, Dave Slack, Jesse Sheidlower, Jody Belka, Marcus Ramberg,
-Mickael Joanne, Simon Flack, Veljko Vidovic and all the others who've
-helped.
+Mickael Joanne, Simon Flack, Steve Simms, Veljko Vidovic and all the others
+who've helped.
 
 =head1 LICENSE