In M::B 0.32, and some earlier versions, there's a bug in the logic to
put a license URL in META.yml.  M::B::Base::prepare_metadata() does this:


    if (my $key = $self->valid_licenses->{ $self->license }) {
      my $class = "Software::License::$key";
      if (eval "use $class; 1") {
        # S::L requires a 'holder' key
        $node->{resources}{license} = $class->new({holder=>"nobody"})->url;
      } else {
        $node->{resources}{license} = $self->_license_url($key);
      }

$self->license returns a string such as "perl", which is the same thing
that goes into META.yml under "license".  $key is a string such as
"Perl_5", part of the Software::License module name.  If S::L is not
installed then the ->_license_url() method is used to look up the URL in
a hash.  The hash that it uses is keyed by "perl"-style keys, but it's
being given the "Perl_5" key.  So it returns undef, and the META.yml
comes out looking like this:

    license: perl
    resources:
      license: ~

-zefram

Reply via email to