« Communication is fruitless | Main | Dutch handicap »
January 23, 2005
Deep recursion ~ Perl stuff
All of a sudden my browser froze up and nothing happened anymore. As it turns out, I had unknowingly introduced a nasty bug into the fancy web application I was working on. This resulted in the dreaded 'deep recursion' error which can be triggered to raise its ugly head by something as innocent looking as this:
sub show_bugs (
my $recurse = shift;
# do something
show_bugs(1) if !$recurse;
}
As you can see here, it is important that one NOT forget the !$recurse or it's dooms day all over again. Be careful, it's a dangerous and unpredictable world out there.

Posted at 1:40 PM
0 Comment(s)
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)







