开发者

Moose throwing an error when trying to build a distribution with Dist::Zilla

开发者 https://www.devze.com 2023-03-20 16:35 出处:网络
I\'m having a bit of trouble with building a Dist::Zilla distribution. Every time I try and build it, or really do anything (i.e., test, smoke, listdeps, whatever it is), I get this error message:

I'm having a bit of trouble with building a Dist::Zilla distribution. Every time I try and build it, or really do anything (i.e., test, smoke, listdeps, whatever it is), I get this error message:

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开发者_StackOverflow中文版)') 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

Or something along those lines. The contents of my dist.ini are as follows:

author  = Gary Warman <email@host.com>
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.

So, anyone here have any idea what's going on so I can resolve this?


Your dist.ini file must contain an assignment for name, which is what that horrid error is reporting. Insert, at the very very top of your file:

name = My-Awesome-Dist

...and it will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消