File Coverage

lib/Dist/Zilla/Util/RoleDB/Items/Core.pm
Criterion Covered Total %
statement 63 63 100.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 72 73 98.6


line stmt bran cond sub pod time code
1 3     3   671 use 5.006;
  3         5  
  3         85  
2 3     3   10 use strict;
  3         3  
  3         62  
3 3     3   10 use warnings;
  3         4  
  3         1210  
4              
5             package Dist::Zilla::Util::RoleDB::Items::Core;
6              
7             our $VERSION = '0.004000'; # TRIAL
8              
9             # ABSTRACT: A collection of roles that are provided by Dist::Zilla itself.
10              
11             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12              
13             my @items;
14              
15              
16              
17              
18              
19              
20              
21              
22              
23             sub all {
24 2 50   2 1 6 return @items if @items;
25 2         3 _add_items();
26 2         15 return @items;
27             }
28              
29             sub _add_entry {
30 36     36   42 my ( $name, $description, @extra ) = @_;
31 36         105 require Dist::Zilla::Util::RoleDB::Entry;
32 36         431 push @items, Dist::Zilla::Util::RoleDB::Entry->new( name => $name, description => $description, @extra );
33 36         251 return;
34             }
35              
36             sub _add_phase {
37 48     48   58 my ( $name, $description, $phase_method, @extra ) = @_;
38 48         708 require Dist::Zilla::Util::RoleDB::Entry::Phase;
39 48         606 push @items,
40             Dist::Zilla::Util::RoleDB::Entry::Phase->new(
41             name => $name,
42             description => $description,
43             phase_method => $phase_method,
44             @extra,
45             );
46 48         338 return;
47             }
48              
49             sub _add_items {
50 2     2   4 _add_phase( q[-AfterBuild] => q[something that runs after building is mostly complete], 'after_build' );
51 2         5 _add_phase( q[-AfterMint] => q[something that runs after minting is mostly complete], 'after_mint' );
52 2         5 _add_phase( q[-AfterRelease] => q[something that runs after release is mostly complete], 'after_release' );
53 2         5 _add_phase( q[-BeforeArchive] => q[something that runs before the archive file is built], 'before_archive' );
54 2         4 _add_phase( q[-BeforeBuild] => q[something that runs before building really begins], 'before_build' );
55 2         4 _add_phase( q[-BeforeMint] => q[something that runs before minting really begins], 'before_mint' );
56 2         3 _add_phase( q[-BeforeRelease] => q[something that runs before release really begins], 'before_release' );
57 2         4 _add_phase( q[-BuildRunner] => q[something that runs a built dists 'build' logic (like in 'dzil run/test')], 'build' );
58 2         4 _add_phase( q[-EncodingProvider] => q[something that sets a files' encoding], 'set_file_encoding' );
59 2         4 _add_phase( q[-FileGatherer] => q[something that gathers files into the distribution], 'gather_files' );
60 2         4 _add_phase( q[-FileMunger] => q[something that alters a file's destination or content], 'munge_files' );
61 2         8 _add_phase( q[-FilePruner] => q[something that removes found files from the distribution], 'prune_files' );
62 2         3 _add_phase( q[-InstallTool] => q[something that creates an install program for a dist], 'setup_installer' );
63 2         3 _add_phase( q[-LicenseProvider] => q[something that provides a license for the dist], 'provide_license' );
64 2         5 _add_phase( q[-MetaProvider] => q[something that provides metadata (for META.yml/json)], 'metadata' );
65 2         3 _add_phase( q[-MintingProfile] => q[something that can find a minting profile dir], 'profile_dir' );
66 2         3 _add_phase( q[-ModuleMaker] => q[something that injects module files into the dist], 'make_module' );
67 2         4 _add_phase( q[-NameProvider] => q[something that provides a name for the dist], 'provide_name', );
68 2         4 _add_phase( q[-PluginBundle] => q[something that bundles a bunch of plugins], 'bundle_config' );
69 2         4 _add_phase( q[-PrereqSource] => q[something that registers prerequisites], 'register_prereqs' );
70 2         3 _add_phase( q[-Releaser] => q[something that makes a release of the dist], 'release' );
71 2         5 _add_phase( q[-ShareDir] => q[something that picks a directory to install as shared files], 'share_dir_map' );
72 2         4 _add_phase( q[-TestRunner] => q[something used as a delegating agent to 'dzil test'], 'test' );
73 2         2 _add_phase( q[-VersionProvider] => q[something that provides a version number for the dist], 'provide_version' );
74              
75 2         5 _add_entry( q[-BuildPL] => q[Common ground for Build.PL based builders] );
76 2         4 _add_entry( q[-Chrome] => q[something that provides a user interface for Dist::Zilla] );
77 2         3 _add_entry( q[-ConfigDumper] => q[something that can dump its (public, simplified) configuration] );
78 2         3 _add_entry( q[-ExecFiles] => q[something that finds files to install as executables] );
79 2         3 _add_entry( q[-FileFinderUser] => q[something that uses FileFinder plugins] );
80 2         4 _add_entry( q[-FileFinder] => q[something that finds files within the distribution] );
81 2         4 _add_entry( q[-FileInjector] => q[something that can add files to the distribution] );
82 2         3 _add_entry( q[-File] => q[something that can act like a file] );
83 2         4 _add_entry( q[-MintingProfile::ShareDir] => q[something that keeps its minting profile in a sharedir] );
84 2         3 _add_entry( q[-MutableFile] => q[something that can act like a file with changeable contents] );
85 2         3 _add_entry( q[-PPI] => q[a role for plugins which use PPI] );
86 2         5 _add_entry( q[-PluginBundle::Easy] => q[something that bundles a bunch of plugins easily] );
87 2         4 _add_entry( q[-Plugin] => q[something that gets plugged in to Dist::Zilla] );
88 2         2 _add_entry( q[-Stash::Authors] => q[a stash that provides a list of author strings] );
89 2         3 _add_entry( q[-Stash::Login] => q[a stash with username/password credentials] );
90 2         5 _add_entry( q[-Stash] => q[something that stores options or data for later reference] );
91 2         4 _add_entry( q[-StubBuild] => q[provides an empty BUILD methods] );
92 2         3 _add_entry( q[-TextTemplate] => q[something that renders a Text::Template template string] );
93 2         2 return;
94             }
95              
96             1;
97              
98             __END__