Revision ff575015
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
SL/Watchdog.pm | ||
---|---|---|
44 | 44 |
$this->{$key} = $value; |
45 | 45 |
} |
46 | 46 |
|
47 |
sub DELETE { |
|
48 |
my ($this, $key) = @_; |
|
49 |
|
|
50 |
if ($watched_variables{$key} && ($this->{$key} ne "")) { |
|
51 |
my $subroutine = (caller 1)[3]; |
|
52 |
my ($self_filename, $self_line) = (caller)[1, 2]; |
|
53 |
$main::lxdebug->_write("WATCH", |
|
54 |
"Value of '$key' changed from '$this->{$key}' to '' " |
|
55 |
. "in ${subroutine} at ${self_filename}:${self_line}"); |
|
56 |
if ($watched_variables{$key} > 1) { |
|
57 |
my $level = 1; |
|
58 |
my ($dummy, $filename, $line); |
|
59 |
|
|
60 |
while (($dummy, $filename, $line, $subroutine) = caller $level) { |
|
61 |
$main::lxdebug->_write("WATCH", " ${subroutine} from ${filename}:${line}"); |
|
62 |
$level++; |
|
63 |
} |
|
64 |
} |
|
65 |
} |
|
66 |
|
|
67 |
delete $this->{$key}; |
|
68 |
} |
|
69 |
|
|
47 | 70 |
1; |
Auch abrufbar als: Unified diff
Das Löschen von $form-Variablen im Watchdog ebenfalls abfangen und überwachen.