]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC.pm
applied patch from nicg : Modified sub warn to use parent package's ar record if...
[maypole.git] / lib / Apache / MVC.pm
index 831527639e58336d5cb0afb8af647cbeaf1fb5eb..6f85d6e170145dfd200333e9d5cfd6677ee6f99a 100644 (file)
@@ -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';