Dist::Zilla::Util::RoleDB::Entry - Extracted meta-data about a role
version 0.003001
use Dist::Zilla::Util::RoleDB::Entry; my $entry = Dist::Zilla::Util::RoleDB::Entry->new( name => "-FileGatherer", description => "A thing that adds files to your dist" );
Returns false
require_module
Load the module itself.
Usually, this just amounts to requiring full_name, but it might not be in the case somebody has manually modified required_modules
full_name
required_modules
name
Contains the short name for the role, in a form acceptable by Dist::Zilla's plugins_with method.
Dist::Zilla
plugins_with
e.g:
-FileGatherer
Because
zilla->plugins_with(-FileGatherer)
Contains the fully qualified version of the role.
For instance, when name is -FileGatherer, full_name will be Dist::Zilla::Role::FileGatherer
Dist::Zilla::Role::FileGatherer
This contains an ArrayRef of Modules that are required if one ever intends to use the module in full_name.
ArrayRef
Note, that this is not intended to be really used. It only exists as a helper in the event one wishes to document a roles existence in a file other than one matching its name.
For example:
Foo.pm: package Foo; use Moose::Role; package Bar; use Moose::Role;
In such a scenario, one cannot get Bar without require Foo
require Foo
So here,
->new( name => 'Foo' ); # required_modules is automatically [Foo] ->new( name => 'Bar', required_modules => ['Foo'] );
Also, if a role has peculiar load order requirements ( like seen in Class::MOP ) that means certain other libraries must be require'd before requireing the module itself, this would be a convenient place to put such information.
require
This mechanism is mostly to support $entry->require_module
$entry->require_module
description
Contains a textual description of the Role.
Usually, a copy of the Roles "ABSTRACT" will do the trick.
deprecated
If a role is deprecated, setting this may be useful.
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2015 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.
To install Dist::Zilla::Util::RoleDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Util::RoleDB
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Util::RoleDB
For more information on module installation, please visit the detailed CPAN module installation guide.