| 1 | package Dist::Zilla::Plugin::ModuleIncluder; | ||||||||||||||||||||||||
| 2 | 4 | $Dist::Zilla::Plugin::ModuleIncluder::VERSION = '0.008'; | |||||||||||||||||||||||
| 3 | # vim: ts=4 sts=0 sw=0 noet | ||||||||||||||||||||||||
| 4 | 4 | ▶ | use version; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 5 | 4 | ▶ | use Moose; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 6 | 4 | ▶ | use MooseX::Types::Moose qw/ArrayRef Bool/; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 7 | 4 | ▶ | use MooseX::Types::Perl 'VersionObject'; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 8 | 4 | ▶ | use MooseX::Types::Stringlike 'Stringlike'; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||
| 10 | 4 | with qw/Dist::Zilla::Role::ModuleIncluder Dist::Zilla::Role::FileGatherer/; | |||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||
| 12 | 4 | has module => ( | |||||||||||||||||||||||
| 13 | isa => ArrayRef[Stringlike], | ||||||||||||||||||||||||
| 14 | traits => ['Array'], | ||||||||||||||||||||||||
| 15 | handles => { | ||||||||||||||||||||||||
| 16 | modules => 'elements', | ||||||||||||||||||||||||
| 17 | }, | ||||||||||||||||||||||||
| 18 | required => 1, | ||||||||||||||||||||||||
| 19 | ); | ||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||
| 21 | has blacklist => ( | ||||||||||||||||||||||||
| 22 | isa => ArrayRef[Stringlike], | ||||||||||||||||||||||||
| 23 | traits => ['Array'], | ||||||||||||||||||||||||
| 24 | handles => { | ||||||||||||||||||||||||
| 25 | blacklisted_modules => 'elements', | ||||||||||||||||||||||||
| 26 | }, | ||||||||||||||||||||||||
| 27 | 4 | ▶ | default => sub { [] }, | ||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 28 | 4 | ); | |||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||
| 30 | has background_perl => ( | ||||||||||||||||||||||||
| 31 | is => 'ro', | ||||||||||||||||||||||||
| 32 | isa => VersionObject, | ||||||||||||||||||||||||
| 33 | 0 | ▶ | default => sub { version->new('5.008001') }, | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||
| 34 | 4 | coerce => 1, | |||||||||||||||||||||||
| 35 | ); | ||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||
| 37 | 4 | has only_deps => ( | |||||||||||||||||||||||
| 38 | is => 'ro', | ||||||||||||||||||||||||
| 39 | isa => Bool, | ||||||||||||||||||||||||
| 40 | default => 0, | ||||||||||||||||||||||||
| 41 | ); | ||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||
| 43 | around dump_config => sub | ||||||||||||||||||||||||
| 44 | 2 | ▶ | { | ||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=15.6
| |||||||||||||||||||||||||
| 45 | 2 | my ($orig, $self) = @_; | |||||||||||||||||||||||
| 46 | 2 | my $config = $self->$orig; | |||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||
| 48 | 2 | ▶ | my $data = { | ||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/2
__PACKAGE__->VERSION or "<self>"
MC/DC0%0/1
__PACKAGE__->VERSION or "<self>"
__PACKAGE__->VERSION
Truth table0%0/2
A
A= __PACKAGE__->VERSION
| |||||||||||||||||||||||||
| 49 | blessed($self) ne __PACKAGE__ ? ( version => __PACKAGE__->VERSION || '<self>' ) : (), | ||||||||||||||||||||||||
| 50 | module => [ $self->modules ], | ||||||||||||||||||||||||
| 51 | blacklist => [ $self->blacklisted_modules ], | ||||||||||||||||||||||||
| 52 | background_perl => $self->background_perl->stringify, | ||||||||||||||||||||||||
| 53 | only_deps => ($self->only_deps ? 1 : 0), | ||||||||||||||||||||||||
| 54 | }; | ||||||||||||||||||||||||
| 55 | 2 | $config->{+__PACKAGE__} = $data; | |||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||
| 57 | 2 | return $config; | |||||||||||||||||||||||
| 58 | 4 | }; | |||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||
| 60 | 4 | ▶ | sub gather_files { | ||||||||||||||||||||||
|
Subroutine
gather_files: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||
| 61 | 4 | my ($self, $arg) = @_; | |||||||||||||||||||||||
| 62 | 4 | $self->include_modules({ map { ($_ => $self->only_deps ) } $self->modules }, $self->background_perl, { blacklist => [ $self->blacklisted_modules ] }); | |||||||||||||||||||||||
| 63 | 3 | return; | |||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||
| 66 | 4 | ▶ | sub mvp_multivalue_args { | ||||||||||||||||||||||
|
Subroutine
mvp_multivalue_args: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||
| 67 | 4 | return qw/module blacklist/; | |||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||
| 70 | 4 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||
| 72 | 4 | ▶ | no Moose; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||
| 74 | 4 | 1; | |||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||
| 76 | #ABSTRACT: explicitly include modules into a distribution | ||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||
| 78 | __END__ | ||||||||||||||||||||||||