From ff575015b4bf46c210403257cb7fb0c4f3fe8c28 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 21 May 2007 13:11:43 +0000 Subject: [PATCH] =?utf8?q?Das=20L=C3=B6schen=20von=20$form-Variablen=20im?= =?utf8?q?=20Watchdog=20ebenfalls=20abfangen=20und=20=C3=BCberwachen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Watchdog.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/SL/Watchdog.pm b/SL/Watchdog.pm index 69ec53ce0..9001b1b32 100644 --- a/SL/Watchdog.pm +++ b/SL/Watchdog.pm @@ -44,4 +44,27 @@ sub STORE { $this->{$key} = $value; } +sub DELETE { + my ($this, $key) = @_; + + if ($watched_variables{$key} && ($this->{$key} ne "")) { + my $subroutine = (caller 1)[3]; + my ($self_filename, $self_line) = (caller)[1, 2]; + $main::lxdebug->_write("WATCH", + "Value of '$key' changed from '$this->{$key}' to '' " + . "in ${subroutine} at ${self_filename}:${self_line}"); + if ($watched_variables{$key} > 1) { + my $level = 1; + my ($dummy, $filename, $line); + + while (($dummy, $filename, $line, $subroutine) = caller $level) { + $main::lxdebug->_write("WATCH", " ${subroutine} from ${filename}:${line}"); + $level++; + } + } + } + + delete $this->{$key}; +} + 1; -- 2.20.1