File Coverage

blib/lib/ExtUtils/Builder/Action/Composite.pm
Criterion Covered Total %
statement 16 19 84.2
branch n/a
condition n/a
subroutine 6 7 85.7
pod 3 3 100.0
total 25 29 86.2


line stmt bran cond sub pod time code
1             package ExtUtils::Builder::Action::Composite;
2             $ExtUtils::Builder::Action::Composite::VERSION = '0.020';
3 11     11   178810 use strict;
  11         33  
  11         473  
4 11     11   60 use warnings;
  11         21  
  11         649  
5              
6 11     11   88 use parent 'ExtUtils::Builder::Action';
  11         19  
  11         82  
7              
8             sub _preference_map {
9             return {
10 1     1   9 flatten => 3,
11             execute => 2,
12             command => 1,
13             code => 0,
14             };
15             }
16              
17             sub execute {
18 22     22 1 784 my ($self, %opts) = @_;
19 22         95 $_->execute(%opts) for $self->flatten(%opts);
20 22         82 return;
21             }
22              
23             sub to_code {
24 0     0 1 0 my ($self, %opts) = @_;
25 0         0 return map { $_->to_code(%opts) } $self->flatten(%opts);
  0         0  
26             }
27              
28             sub to_command {
29 1     1 1 19 my ($self, %opts) = @_;
30 1         6 return map { $_->to_command(%opts) } $self->flatten(%opts);
  2         28  
31             }
32              
33             1;
34              
35             # ABSTRACT: A base role for composite action classes
36              
37             __END__