Subject: | external_license_file not set if license set in META.yml |
here are some excerpts of Module::CPANTS::Kwalitee::License::analyse
# check META.yml
my $yaml=$me->d->{meta_yml};
if ($yaml) {
if ($yaml->{license} and $yaml->{license} ne 'unknown') {
$me->d->{license} = $yaml->{license};
return;
}
}
==> note that you return if yaml specifies a license.
analyse() then continues (if no yaml, or no license in yaml) to check if
there's a LICEN[CS]E file. and you will note in particular line 32 where
you set external_license_file:
$me->d->{external_license_file}=$file;
this line is never reached in some cases (yaml sets license), although
you're using this key line 74 for a kwalitee metric:
code=>sub { shift->{external_license_file} ? 1 : 0 }
this is wrong. you should always test external license file...