“dzil新”已停止工作
问题描述:
我正在使用perlbrew。在Perl v5.16.2和v5.14.2下测试,在Mac OS X,Debian和Ubuntu机器上测试。结果总是一样的:“dzil新”已停止工作
[email protected]:~$ 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.
[email protected]:~$ 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
[email protected]:~$ cat Some-Module/lib/Some/Module.pm
use strict;
use warnings;
package Some::Module;
1;
[email protected]:~$
产生这个错误的线是从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
方法;怎么会呢,如果预计创建样板代码,毕竟?!
答
您需要运行dzil setup
(或以其他方式在~/.dzil/config.ini
中创建[%Rights]
存储)。它应该看起来像这样:
[%Rights]
license_class = Perl_5
copyright_holder = Your Name Here
哦,具有讽刺意味的是:'〜/ .dzil'是我忘记复制的环境中唯一的一部分!谢谢! – creaktive