]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/CGI/Maypole.pm
applied parse_path fix to CGI::Maypole
[maypole.git] / lib / CGI / Maypole.pm
index b8a0a48d3d40d6351f00d4533c0ca16e2953ab59..df244326a4c6b497161c324678b27b6376aea0cc 100644 (file)
@@ -97,7 +97,11 @@ sub parse_location
     {
         no warnings 'uninitialized';
         $path .= '/' if $path eq $loc;
-        $path =~ s/^($loc)?\///;
+       if ($loc =~ /\/$/) {
+         $path =~ s/^($loc)?//;
+       } else {
+         $path =~ s/^($loc)?\///;
+       }
     }
     $r->path($path);
     
@@ -105,6 +109,17 @@ sub parse_location
     $r->parse_args;
 }
 
+=item warn
+
+=cut
+
+sub warn {
+    my ($self,@args) = @_;
+    my ($package, $line) = (caller)[0,2];
+    warn "[$package line $line] ", @args ;
+    return;
+}
+
 =item parse_args
 
 =cut