Skip Menu |

This queue is for tickets about the Module-CPANTS-Analyse CPAN distribution.

Report information
The Basics
Id: 92247
Status: resolved
Priority: 0/
Queue: Module-CPANTS-Analyse

People
Owner: Nobody in particular
Requestors: cpan [...] zoffix.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Some sort of issues with LICENSE section
I'm getting this error, despite the LICENSE section being present: xt/kwalitee.t .. 1/? # Failed test 'has_license_in_source_file' # at xt/kwalitee.t line 12. # Error: Does not have license information in any of its source files # Details: # LICENSE section was not found in the pod. # Remedy: Add =head1 LICENSE and the text of the license to the main module in your code. The error goes away if I add this code in my pod (the "Artistic" part seems significant): =head1 LICENSE AND COPYRIGHT Artistic If I remove it, the test fails with the aforementioned error, even though this part is present in the code: =head1 LICENSE AND COPYRIGHT This program is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit L<http://creativecommons.org/licenses/by-sa/1.0/> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
The implementation for this metric is in https://metacpan.org/pod/Module::CPANTS::Kwalitee::License -- moving queues.
On 2014-01-17 20:02:54, ETHER wrote: Show quoted text
> The implementation for this metric is in > https://metacpan.org/pod/Module::CPANTS::Kwalitee::License -- moving > queues.
...although you might want to report this to Software::LicenseUtils as well.
Subject: [PATCH] Some sort of issues with LICENSE section
Show quoted text
> > ...although you might want to report this to Software::LicenseUtils as well. >
No, the bug is in Module::CPANTS::Kwalitee::License, as the metric checks whethere there's a LICENSE section in the pod and not whether that section contains a valid license. There was an experimental metric for "has known license" but it's commented out right now. ---- Attached is the PATCH that makes Module::CPANTS::Kwalitee::License pass the failing q{Add =head1 LICENSE and the text of the license to the main module in your code.} metric properly, even if the LICENSE section contains an unknown license.
Subject: has-license-section-check.patch
--- lib/Module/CPANTS/Kwalitee/License.pm_orig 2014-01-18 09:32:24.105889072 -0500 +++ lib/Module/CPANTS/Kwalitee/License.pm 2014-01-18 09:36:45.389892498 -0500 @@ -151,7 +151,8 @@ remedy=>q{Add =head1 LICENSE and the text of the license to the main module in your code.}, code=>sub { my $d = shift; - return $d->{license_in_pod} ? 1 : 0; + return $d->{license_in_pod} || $d->{unknown_license_texts} + ? 1 : 0; }, details=>sub { my $d = shift;
Show quoted text
> > ...although you might want to report this to Software::LicenseUtils as well. >
Ok, I just now understood what you meant lol :) Need more coffee :) I see there is https://metacpan.org/release/Software-License-CCpack that isn't part of https://metacpan.org/release/Software-License distro, which is why it doesn't detect the license aforementioned in this ticket (even if I change the version in its URL to 3.0) I'll submit a new ticket with a patch, if I figure out how to make Module::CPANTS::Kwalitee::License recognize that license too. (this ticket update does not invalidate patch I included in the previous update).
Fixed in the master in a more straightforward way; thanks. On Sun Jan 19 02:21:59 2014, ZOFFIX wrote: Show quoted text
> Pull request on github: https://github.com/cpants/Module-CPANTS- > Analyse/pull/12
On Thu Jan 23 14:32:10 2014, ISHIGAKI wrote: Show quoted text
> Fixed in the master in a more straightforward way; thanks. > > On Sun Jan 19 02:21:59 2014, ZOFFIX wrote:
> > Pull request on github: https://github.com/cpants/Module-CPANTS- > > Analyse/pull/12
> >
Closed as 0.94 is released. Thanks.