我正在使用perlbrew。在Perl v5.16.2和v5.14.2下测试,在Mac OS X,Debian和Ubuntu框中。结果总是一样的:
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:~$
产生该错误的行来自lib/Dist/Zilla.pm
,v4.300028(最新的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"
);
}
不确定guess_license_from_pod
方法;怎么可能,如果预计创建样板代码呢?毕竟?!
答案 0 :(得分:1)
您需要运行dzil setup
(或在[%Rights]
中创建~/.dzil/config.ini
藏匿处。看起来应该是这样的:
[%Rights]
license_class = Perl_5
copyright_holder = Your Name Here