Giter Site home page Giter Site logo

config-mvp's People

Contributors

book avatar chorny avatar hartzell avatar karenetheridge avatar kentfredric avatar rjbs avatar skirmess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

config-mvp's Issues

Not an ARRAY reference error when you try to add a FinderCode plugin from a bundle

I wanted to create a new FinderCode plugin from within my bundle with the following config:

        [
            'FinderCode', 'MyPersonalFinder',
            {
                code  => \&_my_sub,
                style => 'list',
            } ,
        ],

Unfortunately, a dzil build breaks with the following error message

Not an ARRAY reference at ~/perl5/lib/perl5/Config/MVP/Assembler/WithBundles.pm line 149, <GEN0> line 29.

The problem seems to be that Config::MVP::Assembler::WithBundles, version 2.200010, treats every ref as an array.

    my @v = ref $payload->{$name}
                ? @{$payload->{$name}}
                : $payload->{$name};

Shouldn't this be

    my @v = ref $payload->{$name} eq ref []
                ? @{$payload->{$name}}
                : $payload->{$name};

Localizing @INC in read_config reverts my desired changes

Localizing @INC (3966df4) breaks this Dist::Zilla use case:

[lib]
lib = inc

[PodWeaver]
config_plugin = @MyBundle       ; uh oh

since munging happens after read_config.

# dzil build
...
Pod::Weaver::PluginBundle::MyBundle (for section @MyBundle) does not appear to be installed
...

recognize ; authordep directives; warn when not fulfilled

Right now Dist::Zilla has custom code for parsing dist.ini for "; authordep" declarations. It would be really nice if the ini parser itself could recognize these, which would let us jump up and down and yell when prereqs are not satisfied. At the moment, there is no checking of these directives, which lets a build process continue on until (possibly) a cryptic error occurs later on. Better for us to detect this early and either warn or die as soon as we know there is an issue!

(perhaps this belongs in the Config::INI queue? I don't know!)

convert to Moo

It is probably possible to convert all this code to Moo now, for potential speed. Maybe someone would be interested in trying!

when evaluating configs, check version before mvp_multivalue_args

I added a new mvp_multivalue_arg option in a Dist::Zilla plugin. When using it in dist.ini I do:

[PluginName]
:version = 0.002
option = foo
option = bar

However, when doing a build when the new version of the plugin is not installed, I get:
multiple values given for property -include_sub in section PluginName at /Users/ether/.perlbrew/libs/21.6@std/lib/perl5/Config/MVP/Assembler.pm line 208.

This is as not a clear an error as we'd get if the version was checked first: Dist::Zilla::Plugin::PluginName version (0.001) does not match required version: 0.002

Is it possible to check the version first before reading PluginName->mvp_multivalue_args?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.