我正在使用 perlbrew。在 Mac OS X、Debian 和 Ubuntu 机器上在 Perl v5.16.2 和 v5.14.2 下测试。结果总是一样的:
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
方法;毕竟,如果期望创建样板代码,它怎么可能呢?!