Revision fd574abb
Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
67 | 67 |
# dummy globals |
68 | 68 |
{ |
69 | 69 |
no warnings 'once'; |
70 |
$::userspath = "users"; |
|
71 |
$::templates = "templates"; |
|
72 |
$::memberfile = "users/members"; |
|
73 |
$::menufile = "menu.ini"; |
|
74 |
$::sendmail = "| /usr/sbin/sendmail -t"; |
|
75 |
$::lxdebug = LXDebug->new; |
|
76 |
$::auth = SL::Auth->new; |
|
77 |
%::myconfig = (); |
|
70 |
$::userspath = "users"; |
|
71 |
$::templates = "templates"; |
|
72 |
$::memberfile = "users/members"; |
|
73 |
$::menufile = "menu.ini"; |
|
74 |
$::sendmail = "| /usr/sbin/sendmail -t"; |
|
75 |
$::lxdebug = LXDebug->new; |
|
76 |
$::auth = SL::Auth->new; |
|
77 |
%::myconfig = (); |
|
78 |
%::called_subs = (); |
|
78 | 79 |
} |
79 | 80 |
} |
80 | 81 |
|
bin/mozilla/common.pl | ||
---|---|---|
509 | 509 |
|
510 | 510 |
# ------------------------------------------------------------------------- |
511 | 511 |
|
512 |
my %_called_subs = (); |
|
513 |
|
|
514 | 512 |
sub call_sub { |
515 | 513 |
$main::lxdebug->enter_sub(); |
516 | 514 |
|
... | ... | |
529 | 527 |
$form->error(sprintf($locale->text("Attempt to call an undefined sub named '%s'"), $name)); |
530 | 528 |
} |
531 | 529 |
|
532 |
$_called_subs{$name}++;
|
|
533 |
# confess "RECURSION DETECTION: call_sub($name) called " . $_called_subs{$name} . " time(s)" if $_called_subs{$name} > 10;
|
|
530 |
$::called_subs{$name}++;
|
|
531 |
confess "RECURSION DETECTION: call_sub($name) called " . $::called_subs{$name} . " time(s)" if $::called_subs{$name} > 10;
|
|
534 | 532 |
|
535 | 533 |
{ |
536 | 534 |
no strict "refs"; |
Auch abrufbar als: Unified diff
Globale Variable bei jedem Request initialisieren.