Skip to content
Browse files

no_symlinks checks only files in MANIFEST, use ExtUtils::Manifest::ma…

…niread
  • Loading branch information...
1 parent 3caa002 commit 66cbf2ee736882e3b478b8da20f9ddfb630a6d2a @rurban committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 Module-CPANTS-Analyse/lib/Module/CPANTS/Kwalitee/Files.pm
View
8 Module-CPANTS-Analyse/lib/Module/CPANTS/Kwalitee/Files.pm
@@ -9,6 +9,7 @@ use Data::Dumper;
use Readonly;
use Software::LicenseUtils;
use File::Slurp qw(slurp);
+use ExtUtils::Manifest;
sub order { 10 }
@@ -60,11 +61,14 @@ sub analyse {
$me->d->{size_unpacked}=$size;
# find symlinks
+ my $manifest = -f catfile($distdir, 'MANIFEST')
+ ? ExtUtils::Manifest::maniread(catfile($distdir, 'MANIFEST'))
+ : {};
my @symlinks;
foreach my $f (@dirs, @files) {
- my $p=catfile($distdir,$f);
+ my $p = catfile($distdir,$f);
if (-l $f) {
- push(@symlinks,$f);
+ push(@symlinks,$f) if $manifest and exists $manifest->{$f};
}
}

2 comments on commit 66cbf2e

@chorny

Is this restriction necessary for something?

@rurban
Owner

Yes. If you have symlinks in your working dir, which are no in MANIFEST. Some private helper scripts e.g.

Please sign in to comment.
Something went wrong with that request. Please try again.