2011-07-14 49 views
0

我在構建Dist :: Zilla發行版時遇到了一些問題。每次我嘗試並構建它,或做任何事情(即試驗,煙,listdeps,不管它是什麼),我得到這個錯誤信息:駝鹿在嘗試構建Dist :: Zilla發行版時拋出錯誤

Attribute name must be provided before calling reader at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/MooseX/LazyRequire/Meta/Attribute/Trait/LazyRequire.pm line 40 
    MooseX::LazyRequire::Meta::Attribute::Trait::LazyRequire::__ANON__('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/x86_64-linux/Class/MOP/Mixin/AttributeCore.pm line 45 
    Class::MOP::Mixin::AttributeCore::default('Moose::Meta::Class::__ANON__::SERIAL::5=HASH(0x50c9c30)', 'Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at reader Dist::Zilla::name (defined at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla.pm line 41) line 6 
    Dist::Zilla::name('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla/Dist/Builder.pm line 264 
    Dist::Zilla::Dist::Builder::build_in('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)', undef) called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla/Dist/Builder.pm line 315 
    Dist::Zilla::Dist::Builder::ensure_built_in('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla/Dist/Builder.pm line 304 
    Dist::Zilla::Dist::Builder::ensure_built('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla/Dist/Builder.pm line 322 
    Dist::Zilla::Dist::Builder::build_archive('Dist::Zilla::Dist::Builder=HASH(0x53d06e0)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Dist/Zilla/App/Command/build.pm line 30 
    Dist::Zilla::App::Command::build::execute('Dist::Zilla::App::Command::build=HASH(0x4aeb7b0)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x4bdb150)', 'ARRAY(0x3873fc8)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/App/Cmd.pm line 231 
    App::Cmd::execute_command('Dist::Zilla::App=HASH(0x3c6f418)', 'Dist::Zilla::App::Command::build=HASH(0x4aeb7b0)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x4bdb150)') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/App/Cmd.pm line 170 
    App::Cmd::run('Dist::Zilla::App') called at /home/mxe/perl5/perlbrew/perls/perl-5.14.0/bin/dzil line 15 

或者類似的規定。我dist.ini的內容如下:

author = Gary Warman <[email protected]> 
license = None ; this is an all rights reserved license 
copyright_holder = Gary Warman 
copyright_year = 2011 
[ReadmeFromPod] 
[@Filter] 
    -bundle = @Basic 
    -remove = Readme 
[AutoPrereqs] 
[OurPkgVersion] ; use this instead of [PkgVersion] 
[PodWeaver] 
[MetaNoIndex] 
    file = perlcritic.rc 
[MetaJSON] 
[NextRelease] 
     format = %-9v %{yyyy-MM-dd}d ; make Changes Spec happy 
[@TestingMania] 
    disable = NoTabsTests ; TestSynopsis optional if synopsis is not perl or if it's a  largely generated codebase 
    critic_config = perlcritic.rc 
[ExtraTests] 
[PodSpellingTests] 
    wordlist = Pod::Wordlist::hanekomu ;optional 
    spell_cmd = aspell list 
[PruneFiles] 
     filenames = dist.ini 
     filenames = weaver.ini 
[@Git] 
[Git::NextVersion] 
    first_version = 0.1.0 ; use semantic versioning if you don't know what this means  read: http://semver.org/ may switch to the semantic versioning plugin at some point. 
[CheckChangesHasContent] 
[Clean] ; optional, this cleans up directories upon running dzil release. 

所以,這裏的任何人有任何想法發生了什麼,所以我可以解決這個問題?

+0

你使用Dist :: Zilla版本4.200009嗎?如果不是,請升級並重試。 –

回答

2

您的dist.ini文件必須包含name的分配,這是可怕的錯誤報告的內容。插入,在您的文件的最頂端:

name = My-Awesome-Dist 

...它會工作。

+0

我完全驚訝於我從來沒有真正閱讀過它。謝謝你向我證明我需要多加關注! – ozzmotik