X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=e16dd829abc76ab7e3c6d1da9b40f0153cfc7e85;hb=9b8f3c269605db27908000957b20cc3a336f9148;hp=13af1719bbb4954de5a005e017072d8dce7caed1;hpb=371b76dc4be5e9a9cd9955e58f689725d458f46b;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 13af171..e16dd82 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -6,7 +6,7 @@ use warnings; use Maypole::Config; use Maypole::Constants; -our $VERSION = '2.0'; +our $VERSION = '2.05'; __PACKAGE__->mk_classdata($_) for qw( config init_done view_object ); __PACKAGE__->mk_accessors( @@ -23,6 +23,7 @@ sub setup { $calling_class = ref $calling_class if ref $calling_class; { no strict 'refs'; + no warnings 'redefine'; # Naughty. *{ $calling_class . "::handler" } = @@ -48,7 +49,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); @@ -59,7 +60,7 @@ sub handler { # See Maypole::Workflow before trying to understand this. my ( $class, $req ) = @_; $class->init unless $class->init_done; - my $r = bless { config => $class->config }, $class; + my $r = bless { template_args => {}, config => $class->config }, $class; $r->get_request($req); $r->parse_location(); my $status = $r->handler_guts(); @@ -72,6 +73,7 @@ sub handler { sub handler_guts { my $r = shift; $r->model_class( $r->config->model->class_of( $r, $r->{table} ) ); + my $applicable = $r->is_applicable; unless ( $applicable == OK ) { @@ -84,7 +86,6 @@ sub handler_guts { # We authenticate every request, needed for proper session management my $status; eval { $status = $r->call_authenticate }; - warn "No return value from authenticate" unless $status; if ( my $error = $@ ) { $status = $r->call_exception($error); if ( $status != OK ) { @@ -442,8 +443,8 @@ Simon Cozens, C =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, Randal Schwartz, Simon Flack, Steve Simms, Veljko Vidovic +and all the others who've helped. =head1 LICENSE