Question

I'm using perlbrew. Tested under Perl v5.16.2 and v5.14.2, on Mac OS X, Debian and Ubuntu boxes. The result is always the same:

stas@Stanislaws-MacBook-Pro:~$ dzil new Some::Module
[DZ] making target dir /Users/stas/Some-Module
[DZ] writing files to /Users/stas/Some-Module
[DZ] guessing dist's main_module is lib/Some/Module.pm
[DZ] no license data in config, no %Rights stash, couldn't make a good guess at license from Pod; giving up
[DZ] no license data in config, no %Rights stash, couldn't make a good guess at license from Pod; giving up at /Users/stas/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.1/darwin-2level/Moose/Meta/Method/Delegation.pm line 110.
stas@Stanislaws-MacBook-Pro:~$ find Some-Module/ -ls
14597828    0 drwxr-xr-x   4 stas     staff         136 Dec  4 00:33 Some-Module/
14597832    0 -rw-r--r--   1 stas     staff           0 Dec  4 00:33 Some-Module/dist.ini
14597829    0 drwxr-xr-x   3 stas     staff         102 Dec  4 00:33 Some-Module/lib
14597830    0 drwxr-xr-x   3 stas     staff         102 Dec  4 00:33 Some-Module/lib/Some
14597831    4 -rw-r--r--   1 stas     staff          52 Dec  4 00:33 Some-Module/lib/Some/Module.pm
stas@Stanislaws-MacBook-Pro:~$ cat Some-Module/lib/Some/Module.pm
use strict;
use warnings;
package Some::Module;

1;
stas@Stanislaws-MacBook-Pro:~$

The lines producing that error are from lib/Dist/Zilla.pm, v4.300028 (latest on CPAN):

require Software::LicenseUtils;
my @guess = Software::LicenseUtils->guess_license_from_pod(
  $self->main_module->content
);

if (@guess != 1) {
  $self->log_fatal(
    "no license data in config, no %Rights stash,",
    "couldn't make a good guess at license from Pod; giving up"
  );
}

Not sure about guess_license_from_pod method; how could it, if it is expected to create the boilerplate code, after all?!

Was it helpful?

Solution

You need to run dzil setup (or otherwise create the [%Rights] stash in ~/.dzil/config.ini). It should look something like this:

[%Rights]
license_class    = Perl_5
copyright_holder = Your Name Here
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top