]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC.pm
Maypole::CLI and the beginnings of a test suite.
[maypole.git] / lib / Apache / MVC.pm
index 0f917752bf419cc0942a1cf91f65f7a27100ad56..e284b1e54e8df4b03f8aee8878c64fa24959ea5d 100644 (file)
@@ -16,12 +16,7 @@ sub parse_location {
     my $loc = $self->{ar}->location;
     no warnings 'uninitialized';
     $self->{path} =~ s/^($loc)?\///;
-    $self->{path} ||= "frontpage";
-    my @pi = split /\//, $self->{path};
-    shift @pi while @pi and !$pi[0];
-    $self->{table} = shift @pi;
-    $self->{action} = shift @pi;
-    $self->{args} = \@pi;
+    $self->parse_path;
 
     $self->{params} = { $self->{ar}->content };
     $self->{query}  = { $self->{ar}->args };