Why not adopt me?
NAME
Dist::Zilla::Util::RoleDB::Entry - Extracted meta-data about a role
VERSION
version 0.004001
SYNOPSIS
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"
);
METHODS
is_phase
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
ATTRIBUTES
name
Contains the short name for the role, in a form acceptable by Dist::Zilla
's plugins_with
method.
e.g:
-FileGatherer
Because
zilla->plugins_with(-FileGatherer)
full_name
Contains the fully qualified version of the role.
For instance, when name
is -FileGatherer
, full_name
will be Dist::Zilla::Role::FileGatherer
required_modules
This contains an ArrayRef
of Modules that are required if one ever intends to use the module in full_name
.
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
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 require
ing the module itself, this would be a convenient place to put such information.
This mechanism is mostly to support $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.
AUTHOR
Kent Fredric <kentnl@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 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.