Revision c13acbec
Von Sven Schöling vor etwa 13 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
95 | 95 |
$::auth = SL::Auth->new; |
96 | 96 |
$::form = undef; |
97 | 97 |
%::myconfig = (); |
98 |
%::called_subs = (); # currently used for recursion detection |
|
99 | 98 |
} |
100 | 99 |
|
101 | 100 |
$SIG{__WARN__} = sub { |
... | ... | |
171 | 170 |
$::cgi = CGI->new(''); |
172 | 171 |
$::locale = Locale->new($::lx_office_conf{system}->{language}); |
173 | 172 |
$::form = Form->new; |
174 |
%::called_subs = (); |
|
175 | 173 |
$::instance_conf = SL::InstanceConfiguration->new; |
176 | 174 |
|
177 | 175 |
my $session_result = $::auth->restore_session; |
bin/mozilla/common.pl | ||
---|---|---|
9 | 9 |
# |
10 | 10 |
###################################################################### |
11 | 11 |
|
12 |
use Carp; |
|
13 | 12 |
use SL::Common; |
14 | 13 |
use SL::DB::Helper::Mappings; |
15 | 14 |
use SL::DBUtils; |
... | ... | |
440 | 439 |
$form->error(sprintf($locale->text("Attempt to call an undefined sub named '%s'"), $name)); |
441 | 440 |
} |
442 | 441 |
|
443 |
$::called_subs{$name}++; |
|
444 |
confess "RECURSION DETECTION: call_sub($name) called " . $::called_subs{$name} . " time(s)" if $::called_subs{$name} > 10; |
|
445 |
|
|
446 | 442 |
{ |
447 | 443 |
no strict "refs"; |
448 | 444 |
&{ $name }(@_); |
t/structure/globals.t | ||
---|---|---|
7 | 7 |
my (@globals, $testcount); |
8 | 8 |
|
9 | 9 |
BEGIN { |
10 |
@globals = qw(lxdebug auth myconfig form cgi lx_office_conf locale called_subs dispatcher instance_conf);
|
|
10 |
@globals = qw(lxdebug auth myconfig form cgi lx_office_conf locale dispatcher instance_conf); |
|
11 | 11 |
$testcount = scalar(@Support::Files::testitems); |
12 | 12 |
} |
13 | 13 |
|
Auch abrufbar als: Unified diff
::called_subs ersatzlos gestrichen.
call_sub Rekursionen sind nicht mehr aufgetreten seit das System eingebaut
wurde, kein Grund auf Verdacht darauf zu prüfen.