Revision fd574abb
Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
# dummy globals
|
||
{
|
||
no warnings 'once';
|
||
$::userspath = "users";
|
||
$::templates = "templates";
|
||
$::memberfile = "users/members";
|
||
$::menufile = "menu.ini";
|
||
$::sendmail = "| /usr/sbin/sendmail -t";
|
||
$::lxdebug = LXDebug->new;
|
||
$::auth = SL::Auth->new;
|
||
%::myconfig = ();
|
||
$::userspath = "users";
|
||
$::templates = "templates";
|
||
$::memberfile = "users/members";
|
||
$::menufile = "menu.ini";
|
||
$::sendmail = "| /usr/sbin/sendmail -t";
|
||
$::lxdebug = LXDebug->new;
|
||
$::auth = SL::Auth->new;
|
||
%::myconfig = ();
|
||
%::called_subs = ();
|
||
}
|
||
}
|
||
|
bin/mozilla/common.pl | ||
---|---|---|
|
||
# -------------------------------------------------------------------------
|
||
|
||
my %_called_subs = ();
|
||
|
||
sub call_sub {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
... | ... | |
$form->error(sprintf($locale->text("Attempt to call an undefined sub named '%s'"), $name));
|
||
}
|
||
|
||
$_called_subs{$name}++;
|
||
# confess "RECURSION DETECTION: call_sub($name) called " . $_called_subs{$name} . " time(s)" if $_called_subs{$name} > 10;
|
||
$::called_subs{$name}++;
|
||
confess "RECURSION DETECTION: call_sub($name) called " . $::called_subs{$name} . " time(s)" if $::called_subs{$name} > 10;
|
||
|
||
{
|
||
no strict "refs";
|
Auch abrufbar als: Unified diff
Globale Variable bei jedem Request initialisieren.