From: Mike S. <m...@pe...> - 2004-10-15 06:28:26
|
---------- Forwarded message ---------- From: Jos I. Boumans <ka...@xs...> To: m...@pe... Cc: ch...@cw... Subject: [PATCH] Log::Log4perl calls non-existing sub Hi, Recent versions of SPOPS use your Log::Log4perl module to provide logging. However, it sometimes (just under SPOPS it seems) manages to call a coderef that isn't there. I've tracked down the problem to Log4perl::Logger around line 690, where a sub is installed in the namespace based on a variable that turns out to be undefined. Below is a patch that fixes this, by checking if the variable has a value first. This makes SPOPS (and our programs on top of it) behave happily again. Regards, -- Jos Boumans "Never ask a man what computer he uses. If it's a Mac, he'll tell you. If it's not, why embarrass him?" - Tom Clancy CPANPLUS http://cpanplus.sf.net *** lib/Log/Log4perl/Logger.pm Mon Aug 16 03:28:11 2004 --- /opt/lib/perl5/site_perl/5.8.3/Log/Log4Perl/Logger.pm Mon Sep 27 14:34:32 2004 *************** *** 688,694 **** # -ms *{__PACKAGE__ . "::is_$lclevel"} = sub { ! $_[0]->{"is_" . $level}->($_[0], "is_" . $lclevel); }; # Add the isXxxEnabled() methods as identical to the is_xxx --- 688,695 ---- # -ms *{__PACKAGE__ . "::is_$lclevel"} = sub { ! $_[0]->{"is_" . $level}->($_[0], "is_" . $lclevel) ! if $_[0]->{"is_".$level}; }; # Add the isXxxEnabled() methods as identical to the is_xxx |