X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FCGI%2FMaypole.pm;h=df244326a4c6b497161c324678b27b6376aea0cc;hp=b8a0a48d3d40d6351f00d4533c0ca16e2953ab59;hb=ec6799b6896d23dd7bc7c2d7fc6cb2ba3703e231;hpb=12d8a77a713d5ed4f08414e5f34e96d45f60e2d3 diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index b8a0a48..df24432 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -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