File Coverage

blib/lib/ExtUtils/Builder/Action.pm
Criterion Covered Total %
statement 15 17 88.2
branch 2 2 100.0
condition n/a
subroutine 4 5 80.0
pod 2 3 66.6
total 23 27 85.1


line stmt bran cond sub pod time code
1             package ExtUtils::Builder::Action;
2             $ExtUtils::Builder::Action::VERSION = '0.020';
3 20     20   215281 use strict;
  20         83  
  20         835  
4 20     20   113 use warnings;
  20         75  
  20         5790  
5              
6             sub new {
7 53     53 0 193014 my ($class, %args) = @_;
8 53         351 return bless { %args }, $class;
9             }
10              
11             sub preference {
12 10     10 1 37 my ($self, @possibilities) = @_;
13 10         99 my $map = $self->_preference_map;
14 10 100       45 my @keys = @possibilities ? @possibilities : keys %{$map};
  5         20  
15 10         50 my ($ret) = reverse sort { $map->{$a} <=> $map->{$b} } @keys;
  29         78  
16 10         69 return $ret;
17             }
18              
19             sub to_code_hash {
20 0     0 1   my ($self, %opts) = @_;
21             return {
22 0           code => $self->to_code(%opts),
23             }
24             }
25              
26             1;
27              
28             #ABSTRACT: The ExtUtils::Builder Action role
29              
30             __END__