X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FCLI.pm;h=0fd3fa3fe9c57589ef608b2c9e804288864367c5;hb=6f3e2ec142b6dd83d7d4960cf15acd6ca8b73e1d;hp=49f267584cf994d1a169c125f24539a37007dcf3;hpb=5f530b5f17106319faa2f437a567332c86bf6a2c;p=maypole.git diff --git a/lib/Maypole/CLI.pm b/lib/Maypole/CLI.pm index 49f2675..0fd3fa3 100644 --- a/lib/Maypole/CLI.pm +++ b/lib/Maypole/CLI.pm @@ -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); }