File Coverage

lib/Dist/Zilla/Util/RoleDB/Items/Core.pm
Criterion Covered Total %
statement 12 66 18.1
branch 0 2 0.0
condition n/a
subroutine 4 8 50.0
pod 1 1 100.0
total 17 77 22.0


line stmt bran cond sub pod time code
1 1     1   739 use 5.008; # utf8
  1         2  
  1         34  
2 1     1   4 use strict;
  1         1  
  1         30  
3 1     1   4 use warnings;
  1         1  
  1         25  
4 1     1   637 use utf8;
  1         37  
  1         8  
5              
6             package Dist::Zilla::Util::RoleDB::Items::Core;
7              
8             our $VERSION = '0.003001';
9              
10             # ABSTRACT: A collection of roles that are provided by Dist::Zilla itself.
11              
12             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
13              
14             my @items;
15              
16              
17              
18              
19              
20              
21              
22              
23              
24             sub all {
25 0 0   0 1   return @items if @items;
26 0           _add_items();
27 0           return @items;
28             }
29              
30             sub _add_entry {
31 0     0     my ( $name, $description, @extra ) = @_;
32 0           require Dist::Zilla::Util::RoleDB::Entry;
33 0           push @items, Dist::Zilla::Util::RoleDB::Entry->new( name => $name, description => $description, @extra );
34 0           return;
35             }
36              
37             sub _add_phase {
38 0     0     my ( $name, $description, $phase_method, @extra ) = @_;
39 0           require Dist::Zilla::Util::RoleDB::Entry::Phase;
40 0           push @items,
41             Dist::Zilla::Util::RoleDB::Entry::Phase->new(
42             name => $name,
43             description => $description,
44             phase_method => $phase_method,
45             @extra,
46             );
47 0           return;
48             }
49              
50             sub _add_items {
51 0     0     _add_phase( q[-AfterBuild] => q[something that runs after building is mostly complete], 'after_build' );
52 0           _add_phase( q[-AfterMint] => q[something that runs after minting is mostly complete], 'after_mint' );
53 0           _add_phase( q[-AfterRelease] => q[something that runs after release is mostly complete], 'after_release' );
54 0           _add_phase( q[-BeforeArchive] => q[something that runs before the archive file is built], 'before_archive' );
55 0           _add_phase( q[-BeforeBuild] => q[something that runs before building really begins], 'before_build' );
56 0           _add_phase( q[-BeforeMint] => q[something that runs before minting really begins], 'before_mint' );
57 0           _add_phase( q[-BeforeRelease] => q[something that runs before release really begins], 'before_release' );
58 0           _add_phase( q[-BuildRunner] => q[something that runs a built dists 'build' logic (like in 'dzil run/test')], 'build' );
59 0           _add_phase( q[-EncodingProvider] => q[something that sets a files' encoding], 'set_file_encoding' );
60 0           _add_phase( q[-FileGatherer] => q[something that gathers files into the distribution], 'gather_files' );
61 0           _add_phase( q[-FileMunger] => q[something that alters a file's destination or content], 'munge_files' );
62 0           _add_phase( q[-FilePruner] => q[something that removes found files from the distribution], 'prune_files' );
63 0           _add_phase( q[-InstallTool] => q[something that creates an install program for a dist], 'setup_installer' );
64 0           _add_phase( q[-LicenseProvider] => q[something that provides a license for the dist], 'provide_license' );
65 0           _add_phase( q[-MetaProvider] => q[something that provides metadata (for META.yml/json)], 'metadata' );
66 0           _add_phase( q[-MintingProfile] => q[something that can find a minting profile dir], 'profile_dir' );
67 0           _add_phase( q[-ModuleMaker] => q[something that injects module files into the dist], 'make_module' );
68 0           _add_phase( q[-NameProvider] => q[something that provides a name for the dist], 'provide_name', );
69 0           _add_phase( q[-PluginBundle] => q[something that bundles a bunch of plugins], 'bundle_config' );
70 0           _add_phase( q[-PrereqSource] => q[something that registers prerequisites], 'register_prereqs' );
71 0           _add_phase( q[-Releaser] => q[something that makes a release of the dist], 'release' );
72 0           _add_phase( q[-ShareDir] => q[something that picks a directory to install as shared files], 'share_dir_map' );
73 0           _add_phase( q[-TestRunner] => q[something used as a delegating agent to 'dzil test'], 'test' );
74 0           _add_phase( q[-VersionProvider] => q[something that provides a version number for the dist], 'provide_version' );
75              
76 0           _add_entry( q[-BuildPL] => q[Common ground for Build.PL based builders] );
77 0           _add_entry( q[-Chrome] => q[something that provides a user interface for Dist::Zilla] );
78 0           _add_entry( q[-ConfigDumper] => q[something that can dump its (public, simplified) configuration] );
79 0           _add_entry( q[-ExecFiles] => q[something that finds files to install as executables] );
80 0           _add_entry( q[-FileFinderUser] => q[something that uses FileFinder plugins] );
81 0           _add_entry( q[-FileFinder] => q[something that finds files within the distribution] );
82 0           _add_entry( q[-FileInjector] => q[something that can add files to the distribution] );
83 0           _add_entry( q[-File] => q[something that can act like a file] );
84 0           _add_entry( q[-MintingProfile::ShareDir] => q[something that keeps its minting profile in a sharedir] );
85 0           _add_entry( q[-MutableFile] => q[something that can act like a file with changeable contents] );
86 0           _add_entry( q[-PPI] => q[a role for plugins which use PPI] );
87 0           _add_entry( q[-PluginBundle::Easy] => q[something that bundles a bunch of plugins easily] );
88 0           _add_entry( q[-Plugin] => q[something that gets plugged in to Dist::Zilla] );
89 0           _add_entry( q[-Stash::Authors] => q[a stash that provides a list of author strings] );
90 0           _add_entry( q[-Stash::Login] => q[a stash with username/password credentials] );
91 0           _add_entry( q[-Stash] => q[something that stores options or data for later reference] );
92 0           _add_entry( q[-StubBuild] => q[provides an empty BUILD methods] );
93 0           _add_entry( q[-TextTemplate] => q[something that renders a Text::Template template string] );
94 0           return;
95             }
96              
97             1;
98              
99             __END__
100              
101             =pod
102              
103             =encoding UTF-8
104              
105             =head1 NAME
106              
107             Dist::Zilla::Util::RoleDB::Items::Core - A collection of roles that are provided by Dist::Zilla itself.
108              
109             =head1 VERSION
110              
111             version 0.003001
112              
113             =head1 METHODS
114              
115             =head2 C<all>
116              
117             Returns all items in this item set, as a list
118              
119             my @entries = $class->all();.
120              
121             =head1 AUTHOR
122              
123             Kent Fredric <kentnl@cpan.org>
124              
125             =head1 COPYRIGHT AND LICENSE
126              
127             This software is copyright (c) 2015 by Kent Fredric <kentfredric@gmail.com>.
128              
129             This is free software; you can redistribute it and/or modify it under
130             the same terms as the Perl 5 programming language system itself.
131              
132             =cut