X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=b18aac351ac44b21cb3d1ddd71a5021e4c19f35a;hb=b8e9dfcaf46ec9995b91b7c433c44de3c38a00dc;hp=e3a92524a8f4a2d52bf458b0dc3c48f183f8b2d6;hpb=e1058b36db231a58f819075b0e5658a872e94f11;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index e3a9252..b18aac3 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -49,10 +49,10 @@ sub init { sub handler { # See Maypole::Workflow before trying to understand this. - my $class = shift; + my ( $class, $req ) = @_; $class->init unless $class->init_done; my $r = bless { config => $class->config }, $class; - $r->get_request(); + $r->get_request($req); $r->parse_location(); my $status = $r->handler_guts(); return $status unless $status == OK; @@ -67,7 +67,7 @@ sub handler_guts { unless ($applicable == OK) { # It's just a plain template delete $r->{model_class}; - $r->{path} =~ s{/}{}; # De-absolutify + $r->{path} =~ s{/$}{}; # De-absolutify $r->template($r->{path}); } # We authenticate every request, needed for proper session management @@ -283,7 +283,7 @@ Simon Cozens, C =head1 THANK YOU -Jesse Scheildlower, Jody Belka, Markus Ramberg, Mickael Joanne, Simon Flack and all the others who've helped. +Jesse Scheidlower, Jody Belka, Markus Ramberg, Mickael Joanne, Simon Flack and all the others who've helped. =head1 LICENSE