X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=858437e39fadc75d1a4ab6ea3543ab5be58f513d;hb=8e96ebeddb37ef30d2e215f935e136a9170576cd;hp=4f4008500aa0ad94a916c311453591ab6fa073e3;hpb=6cd7a25572c93242146d8d8ce0eb3f2bbb76917e;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 4f40085..858437e 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -476,7 +476,6 @@ sub component { $self->get_user; my $url = URI->new($path); - warn "path : $path\n"; $self->{path} = $url->path; $self->parse_path; $self->params( $url->query_form_hash ); @@ -986,10 +985,13 @@ sub parse_path # conditionally, broke lots of tests, hence this: $self->$_(undef) for qw/action table args/; $self->preprocess_path; - $self->path || $self->path('frontpage'); - my @pi = grep {length} split '/', $self->path; + # use frontpage template for frontpage + unless ($self->path && $self->path ne '/') { + $self->path('frontpage'); + } + my @pi = grep {length} split '/', $self->path; $self->table || $self->table(shift @pi); $self->action || $self->action( shift @pi or 'index' );