X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/096f9e3e06dc378bcc2f97df58c74cec02b9f7ff..0e079eba45bcb834792660358b2e86dcb70e494e:/bin/mozilla/common.pl diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index defa5f1b0..c8ab34033 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -9,6 +9,7 @@ # ###################################################################### +use Carp; use SL::Common; use SL::DBUtils; use SL::Form; @@ -508,6 +509,8 @@ sub show_history { # ------------------------------------------------------------------------- +my %_called_subs = (); + sub call_sub { $main::lxdebug->enter_sub(); @@ -526,6 +529,9 @@ sub call_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; + { no strict "refs"; &{ $name }(@_);