]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
Templates should be valid XHTML now...
[maypole.git] / lib / Maypole.pm
index e3a92524a8f4a2d52bf458b0dc3c48f183f8b2d6..b18aac351ac44b21cb3d1ddd71a5021e4c19f35a 100644 (file)
@@ -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<simon@cpan.org>
 
 =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