From: Simon Cozens Date: Thu, 26 Feb 2004 15:07:02 +0000 (+0000) Subject: Make frontpage actually work. X-Git-Tag: 2.10~285 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=commitdiff_plain;h=de775747b2afbf82d6b9858e958dc5a19ddfd31f Make frontpage actually work. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@77 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 68f2c0a..d43e292 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -14,7 +14,8 @@ sub parse_location { my $self = shift; $self->{path} = $self->{ar}->uri; my $loc = $self->{ar}->location; - $self->{path} =~ s/^$loc//; # I shouldn't need to do this? + no warnings 'uninitialized'; + $self->{path} =~ s/^$loc?\///; $self->{path} ||= "frontpage"; my @pi = split /\//, $self->{path}; shift @pi while @pi and !$pi[0];