diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-07-09 19:28:27 +0200 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-07-09 19:28:27 +0200 |
| commit | 3ac7df0e003be404c4c1e6ece41961fb2f444af4 (patch) | |
| tree | 3d692368bf64f3799b88cf20cf775cd6004a7737 /bin | |
| parent | 36c348b312ff80c1b1e05fc1a9f249d58350b8b7 (diff) | |
checklinks: do not use smartmatch
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/checklinks | 6 |
1 files 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(); |
