File Coverage

blib/lib/ExtUtils/Builder/Action/Perl.pm
Criterion Covered Total %
statement 14 16 87.5
branch 1 2 50.0
condition n/a
subroutine 5 6 83.3
pod 2 2 100.0
total 22 26 84.6


line stmt bran cond sub pod time code
1             package ExtUtils::Builder::Action::Perl;
2             $ExtUtils::Builder::Action::Perl::VERSION = '0.020';
3 11     11   227977 use strict;
  11         31  
  11         542  
4 11     11   61 use warnings;
  11         19  
  11         704  
5              
6 11     11   63 use parent 'ExtUtils::Builder::Action::Primitive';
  11         22  
  11         104  
7              
8             sub _preference_map {
9             return {
10 7     7   53 execute => 3,
11             code => 2,
12             command => 1,
13             flatten => 0,
14             };
15             }
16              
17             sub message {
18 0     0 1 0 my $self = shift;
19 0         0 return $self->{message};
20             }
21              
22             sub to_code_hash {
23 3     3 1 8 my ($self, %opts) = @_;
24 3         9 my %result = (
25             modules => [ $self->modules ],
26             code => $self->to_code(skip_loading => 1, %opts),
27             );
28 3 50       12 $result{message} = $self->{message} if defined $self->{message};
29 3         16 return \%result;
30             }
31              
32             1;
33              
34             # ABSTRACT: A base-role for Code actions
35              
36             __END__