From: Aaron Trevena Date: Fri, 23 Mar 2007 18:57:47 +0000 (+0000) Subject: applied patch from nicg : Modified sub warn to use parent package's ar record if... X-Git-Tag: 2.12~17 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=dd1b398a6d2ba788021fafdb7d385e0dae1b0b50;p=maypole.git 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 --- 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"; }