Code Monkey home page Code Monkey logo

dist-zilla-plugin-metaprovides's Introduction

NAME

Dist::Zilla::Plugin::MetaProvides - Generating and Populating 'provides' in your META.yml

VERSION

version 2.001003

SYNOPSIS

In your projects dist.ini

[MetaProvides::Class]
inherit_version = 0    ;optional flag
inherit_missing = 0    ;optional flag
meta_noindex    = 1    ;optional flag

[MetaProvides::Package]
inherit_version = 0    ;optional flag
inherit_missing = 0    ;optional flag
meta_noindex    = 1    ;optional flag

[MetaProvides::FromFile]
inherit_version = 0     ;optional flag
inherit_missing = 0     ;optional flag
file = some_file.ini    ;mandatory flag
reader_name = Config::INI::Reader ;optional flag
meta_noindex    = 1     ;optional and useless flag

And then in some_file.ini

[Imaginary::Package]
file = lib/Imaginary/Package.pm ;mandatory flag
version = 3.1415                ;optional flag, subject to rules in dist.ini

DESCRIPTION

This Distribution Contains a small bundle of plugins for various ways of populating the META.yml that is built with your distribution.

The initial reason for this is due to stuff that uses MooseX::Declare style class definitions not being parseable by many tools upstream, so this is here to cover this problem by defining it in the metadata.

COMPONENT SUMMARY

::Class

Scans Dist::Zilla's .pm files and tries to identify classes using Class::Discover.

Dist::Zilla::Plugin::MetaProvides::Class

::Package

Scans Dist::Zilla's .pm files and tries to identify more traditional packages using a combination of Module::Extract::VERSION and Module::Extract::Namespaces.

Dist::Zilla::Plugin::MetaProvides::Package

::FromFile

In the event both of the above don't work for your needs, pull in hand-crafted metadata from a specified file.

Dist::Zilla::Plugin::MetaProvides::FromFile

OPTION SUMMARY

inherit_version

At the time this plugin runs to collect metadata from files, the mungers won't have run yet to inject custom versions into files in the various locations.

If you want the versions reported in the provides list to be consistent with the ones actually in the files, you will need to use this option in its enabled state.

IE: Generally, if you are using version munging, you WILL want this flag set to 1.

values

  • '0'

    Do not inherit version from Dist::Zilla

  • '1' [default]

    Inherit version from Dist::Zilla

"inherit_version" in Dist::Zilla::Role::MetaProvider::Provider

inherit_missing

If for whatever reason you want to actually use the versions found in the modules where present, and fall back to the value from Dist::Zilla.

inherit_version will need to be turned off (0) for this to be effective.

values

  • '0'

    Do not inherit version from Dist::Zilla when one is missing.

  • '1' [default]

    Inherit version from Dist::Zilla when one is missing.

"inhert_missing" in Dist::Zilla::Role::MetaProvider::Provider

meta_noindex

This dictates how to behave when a discovered class is also present in the no_index META field.

values

  • '0' [default]

    no_index META field will be ignored

  • '1'

    no_index META field will be recognised and things found in it will cause respective packages to not be provided in the metadata.

"meta_noindex" in Dist::Zilla::Role::MetaProvider::Provider

file

( Dist::Zilla::Plugin::MetaProvides::FromFile )

This is a mandatory parameter that points to the file that contains manually ( or otherwise ) crafted metadata to be integrated into your final META.yml

File Must exist.

reader_name

( Dist::Zilla::Plugin::MetaProvides::FromFile )

This parameter is by default Config::INI::Reader, but it can be in fact anything that meets the following criteria.

  • Can be initialized an instance of

  • has a read_file method on the instance

  • read_file can take the parameter 'file'

  • read_file can return a hashref matching the following structure

      { 'Package::Name' => {
          'file' => '/path/to/file',
          'version' => 0.1,
      }}
    

AUTHOR

Kent Fredric [email protected]

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Kent Fredric [email protected].

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

dist-zilla-plugin-metaprovides's People

Contributors

kentfredric avatar

Watchers

 avatar

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.