From 3ac7df0e003be404c4c1e6ece41961fb2f444af4 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 9 Jul 2024 19:28:27 +0200 Subject: checklinks: do not use smartmatch --- bin/checklinks | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/checklinks b/bin/checklinks index 314c5b8..a86ff47 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -43,7 +43,9 @@ sub dir_content { opendir(my $dh, $dir) or die("Cannot opendir $dir: $!"); while (my $entry = readdir($dh)) { - next if ($entry ~~ ['.', '..', '.git', '.hg', '.links', 'links']); + if ($entry =~ m{ [.] | [.][.] | [.]git | [.]hg | [.]?links }x) { + next; + } push(@return, $entry); @@ -218,7 +220,7 @@ while (my $line = <$links>) { my ($type, $src, $dst) = split(/\s+/, $line); - next if (not($type ~~ ['soft', 'hard', 'auto'])); + next if ($type !~ m{ soft | hard | auto }x); if ($type eq 'auto') { loop_links(); -- cgit v1.2.3