Skip Menu |
 

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

Report information
The Basics
Id: 75332
Status: new
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

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



Subject: MI Encourages users to use the nonstandard "gpl2" when it should be "gpl_2"

The following code chunk in metadata.pm encourages users to specify the syntax "gpl2" for specifiyng GPL version 2, but this clashes with the Spec, that requires it to be "gpl_2"

Show quoted text

    gpl          => 'http://opensource.org/licenses/gpl-license.php',
    gpl2         => 'http://opensource.org/licenses/gpl-2.0.php',
    gpl3         => 'http://opensource.org/licenses/gpl-3.0.html',

...

sub license {
        my $self = shift;
        return $self->{values}->{license} unless @_;
        my $license = shift or die(
                'Did not provide a value to license()'
        );
        $license = __extract_license($license) || lc $license;
        $self->{values}->{license} = $license;

        # Automatically fill in license URLs
        if ( $license_urls{$license} ) {
                $self->resources( license => $license_urls{$license} );
        }

        return 1;
}

"gpl2" as a license specifier is not listed in the API documentation for Meta 1.4 ( http://module-build.sourceforge.net/META-spec-v1.4.html#license , http://search.cpan.org/dist/Module-Build/lib/Module/Build/API.pod#license )  or in Software::License  https://metacpan.org/release/Software-License

and is not listed  in the Meta 2.0 spec either : https://metacpan.org/module/CPAN::Meta::Spec#license

And this results in being coerced to "unknown" when specified and then converted to a 2.0 META.json

 

ie:   https://metacpan.org/source/BROQ/Gitalist-0.003008/Makefile.PL

license 'gpl2';

 

https://metacpan.org/source/BROQ/Gitalist-0.003008/META.yml

license: gpl2

https://metacpan.org/source/BROQ/Gitalist-0.003008/MYMETA.json

"license" : [

      "unknown"
   ],

https://metacpan.org/source/BROQ/Gitalist-0.003008/MYMETA.yml

"license" : [
      "unknown"
   ],

 





 

 



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.