X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FCGI%2FMaypole.pm;h=df244326a4c6b497161c324678b27b6376aea0cc;hp=d223c768c335b20e85d10af609fd0c271498c339;hb=ec6799b6896d23dd7bc7c2d7fc6cb2ba3703e231;hpb=32ecafee815b0fd8043c0acc2c785f5748fc20ff diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index d223c76..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,10 @@ sub parse_location $r->parse_args; } +=item warn + +=cut + sub warn { my ($self,@args) = @_; my ($package, $line) = (caller)[0,2];