add perlcritic module to disallow system/exec

This commit is contained in:
Jörg Thalheim
2025-08-05 22:39:22 +02:00
committed by ahuston-0
parent b9465afb85
commit 2e02b25da5
3 changed files with 109 additions and 0 deletions

View File

@@ -10,4 +10,7 @@ my $dirname = abs_path(dirname(__FILE__) . "/..");
print STDERR "Executing perlcritic against $dirname\n";
chdir($dirname) or die "Failed to enter $dirname\n";
# Add src/lib to PERL5LIB so perlcritic can find our custom policies
$ENV{PERL5LIB} = "src/lib" . ($ENV{PERL5LIB} ? ":$ENV{PERL5LIB}" : "");
exec("perlcritic", ".") or die "Failed to execute perlcritic.";