From dd1b398a6d2ba788021fafdb7d385e0dae1b0b50 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Fri, 23 Mar 2007 18:57:47 +0000 Subject: [PATCH] applied patch from nicg : Modified sub warn to use parent package's ar record if there is one git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@557 48953598-375a-da11-a14b-00016c27c3ee --- lib/Apache/MVC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 384b497..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"; } -- 2.39.2