File Coverage

blib/lib/Dist/Zilla/Util/RoleDB/Entry/Phase.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 26 26 100.0


line stmt bran cond sub pod time code
1 3     3   512 use 5.006;
  3         7  
2 3     3   14 use strict;
  3         4  
  3         63  
3 3     3   18 use warnings;
  3         2  
  3         196  
4              
5             package Dist::Zilla::Util::RoleDB::Entry::Phase;
6              
7             our $VERSION = '0.004001';
8              
9             # ABSTRACT: Extracted meta-data about a role that represents a phase
10              
11             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12              
13 3     3   455 use Moo qw( has extends );
  3         9964  
  3         20  
14 3     3   1686 use Carp qw( croak );
  3         4  
  3         527  
15              
16             ## no critic (NamingConventions)
17             my $is_Str = sub { 'SCALAR' eq ref \$_[0] or 'SCALAR' eq ref \( my $val = $_[0] ) };
18              
19             extends 'Dist::Zilla::Util::RoleDB::Entry';
20              
21              
22              
23              
24              
25              
26              
27             sub is_phase {
28 24     24 1 29 return 1;
29             }
30              
31              
32              
33              
34              
35              
36              
37             has phase_method => (
38             isa => sub { $is_Str->( $_[0] ) or croak 'phase_method must be a Str' },
39             is => ro =>,
40             required => 1,
41             documentation => q[The method dzil calls on the phase],
42             );
43              
44 3     3   15 no Moo;
  3         4  
  3         11  
45             1;
46              
47             __END__
48              
49             =pod
50              
51             =encoding UTF-8
52              
53             =head1 NAME
54              
55             Dist::Zilla::Util::RoleDB::Entry::Phase - Extracted meta-data about a role that represents a phase
56              
57             =head1 VERSION
58              
59             version 0.004001
60              
61             =head1 METHODS
62              
63             =head2 C<is_phase>
64              
65             Returns true.
66              
67             =head1 ATTRIBUTES
68              
69             =head2 C<phase_method>
70              
71             Returns the method C<Dist::Zilla> calls to implement this phase
72              
73             =head1 AUTHOR
74              
75             Kent Fredric <kentnl@cpan.org>
76              
77             =head1 COPYRIGHT AND LICENSE
78              
79             This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
80              
81             This is free software; you can redistribute it and/or modify it under
82             the same terms as the Perl 5 programming language system itself.
83              
84             =cut