From 7a0f517afe64b7e395d33ad918f54583363c7db1 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Wed, 8 Jun 2011 11:43:07 +0530 Subject: [PATCH] sometimes you shouldn't call log_it()... a warn/die may happen even before setup_environment() has been called, so then log_it() tries to use uninitialised variables and it then adds to the confusion complaining about *those* --- src/gitolite.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gitolite.pm b/src/gitolite.pm index 62c6791..e7be1bd 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -57,13 +57,13 @@ BEGIN { $SIG{__DIE__} = sub { my $msg = join(' ', "Die generated at line", (caller)[2], "in", (caller)[1], ":", @_, "\n"); $msg =~ s/[\n\r]+/<>/g; - log_it($msg); + log_it($msg) if $ENV{GL_LOG}; }; $SIG{__WARN__} = sub { my $msg = join(' ', "Warn generated at line", (caller)[2], "in", (caller)[1], ":", @_, "\n"); $msg =~ s/[\n\r]+/<>/g; - log_it($msg); + log_it($msg) if $ENV{GL_LOG}; warn @_; }; }