X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FApache%2FMVC.pm;h=6f85d6e170145dfd200333e9d5cfd6677ee6f99a;hb=dd1b398a6d2ba788021fafdb7d385e0dae1b0b50;hp=831527639e58336d5cb0afb8af647cbeaf1fb5eb;hpb=2c5d6782f89dc1532398b1b79c8f67b982c758ac;p=maypole.git diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 8315276..6f85d6e 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -108,8 +108,9 @@ sub get_request { sub warn { my ($self,@args) = @_; my ($package, $line) = (caller)[0,2]; + my $ar = $self->parent ? $self->parent->{ar} : $self->{ar}; if ( $args[0] and ref $self ) { - $self->{ar}->warn("[$package line $line] ", @args) ; + $ar->warn("[$package line $line] ", @args) ; } else { print "warn called by ", caller, " with ", @_, "\n"; } @@ -134,7 +135,8 @@ sub parse_location { } my $path = $self->ar->uri; - my $loc = $self->ar->location; + my $base = URI->new($self->config->uri_base); + my $loc = $base->path; { no warnings 'uninitialized';