Kent Fredric

NAME

Dist::Zilla::Util::BundleInfo::Plugin - Data about a single plugin instance in a bundle

VERSION

version 1.001001

METHODS

inflate_bundle_entry

Creates a <::BundleInfo::Plugin node based on an array-line returned from yourbundle->bundle_config.

e.g:

  my $instance = ::Plugin->inflate_bundle_entry([
    '@ABUNDLE/My::Name::Here', 'Fully::Qualified::Module::Name', { %config }
  ]);

to_bundle_entry

As with inflate_bundle_entry, except does the inverse operation, turning an object into an array to pass to Dist::Zilla

  my $line = $instance->to_bundle_entry;

short_module

Returns the "short" form of the module name.

This is basically the inverse of Dist::Zillas plugin name expansion routine

  Dist::Zilla::Plugin::Foo      -> Foo
  Non::Dist::Zilla::Plugin::Foo -> =Non::Dist::Zilla::Plugin::Foo

payload_list

Returns the payload in "expanded" form.

Internally, payloads are stored as:

  {
    key_a => value_0,
    key_b => [ value_1, value_2, value_3 ],
  }

And this is optimal for coding.

This method returns them in an order more amenable for INI injection.

  ( 'key_a', value_0,
    'key_b', value_1,
    'key_b', value_2,
    'key_b', value_3,
  )

to_dist_ini

Returns a copy of this plugin in a textual form suitable for injecting into a dist.ini

ATTRIBUTES

name

The "name" property of the plugin.

e.g:

  [ Foo / Bar ]  ; My name is Bar

module

The "module" property of the plugin.

e.g.:

  [ Foo / Bar ]  ; My module is Dist::Zilla::Plugin::Bar

payload

The "payload" property of the plugin that will be passed during register_compontent

AUTHOR

Kent Fredric <kentfredric@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Kent Fredric <kentfredric@gmail.com>.

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




Hosting generously
sponsored by Bytemark