]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/CLI.pm
added rewrite_path()
[maypole.git] / lib / Maypole / CLI.pm
index 49f267584cf994d1a169c125f24539a37007dcf3..0fd3fa3fe9c57589ef608b2c9e804288864367c5 100644 (file)
@@ -22,10 +22,11 @@ sub get_template_root { $ENV{MAYPOLE_TEMPLATES} || "." }
 
 sub parse_location {
     my $self = shift;
-    my $url  = URI->new(shift @ARGV);
-    my $root = URI->new($self->config->uri_base)->path;
+    my $url  = URI->new( shift @ARGV );
+    my $root = URI->new( $self->config->uri_base )->path;
     $self->{path} = $url->path;
     $self->{path} =~ s/^$root//i if $root;
+    $self->rewrite_path;
     $self->parse_path;
     $self->parse_args($url);
 }