summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbscan <10503608+bscan@users.noreply.github.com>2024-03-01 13:58:02 -0500
committerbscan <10503608+bscan@users.noreply.github.com>2024-03-01 13:58:02 -0500
commit6e6c3b5938c1d8d1917a1ff7444d9ba9844ffce5 (patch)
tree6a7840ac2df8b1460f96115acc2118a4334335df
parente99cb0c78c197464e9944fbc45f6a54a1f203e99 (diff)
downloadPerlNavigator-6e6c3b5938c1d8d1917a1ff7444d9ba9844ffce5.zip
Use follow_skip to avoid crashing on some symlink setups. Also skip 'next'. Fixes #115
-rw-r--r--server/src/perl/lib_bs22/ModHunter.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/perl/lib_bs22/ModHunter.pl b/server/src/perl/lib_bs22/ModHunter.pl
index c9e6344..a31fbe1 100644
--- a/server/src/perl/lib_bs22/ModHunter.pl
+++ b/server/src/perl/lib_bs22/ModHunter.pl
@@ -24,6 +24,7 @@ sub get_modules {
push @files, $_ if -f $_ and /\.pm$/ },
no_chdir => 1,
follow_fast => 1, # May generate duplicates
+ follow_skip => 2, # Don't if we observe duplicates
},
@find_dirs
);
@@ -85,7 +86,7 @@ sub myuniq {
my $modsFound = get_modules();
# Generally, having keywords like "if" provide hover or definitions as a module is more confusing than helpful.
-my @modsToSkip = ('if', 'open', 'sort');
+my @modsToSkip = ('if', 'open', 'sort', 'next');
delete $modsFound->{$_} foreach @modsToSkip;
print "Dumping Mods\n";