summaryrefslogtreecommitdiff
path: root/examples/depmod.pl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/depmod.pl')
-rwxr-xr-xexamples/depmod.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/depmod.pl b/examples/depmod.pl
index 8c6548d..f324b12 100755
--- a/examples/depmod.pl
+++ b/examples/depmod.pl
@@ -173,6 +173,9 @@ sub add_mod_deps
$depth .= " ";
warn "${depth}loading deps of module: $this_module\n" if $verbose;
+ if (length($depth) > 50) {
+ die "too much recursion (circular dependencies in modules?)";
+ }
foreach my $md (keys %{$mod->{$this_module}}) {
add_mod_deps ($depth, $mod, $mod2, $module, $md);