Permalink
Browse files

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

…niread
  • Loading branch information...
Reini Urban
Reini Urban committed Jul 14, 2011
1 parent 3caa002 commit 66cbf2ee736882e3b478b8da20f9ddfb630a6d2a
Showing with 6 additions and 2 deletions.
  1. +6 −2 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

This comment has been minimized.

Show comment
Hide comment
@chorny

chorny Jul 14, 2011

Is this restriction necessary for something?

Is this restriction necessary for something?

@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Jul 17, 2011

Owner

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

Owner

rurban replied Jul 17, 2011

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.