File Coverage

blib/lib/Aion/Meta/RequiresAnyFunction.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 3 3 100.0
total 24 26 92.3


line stmt bran cond sub pod time code
1             package Aion::Meta::RequiresAnyFunction;
2              
3 5     5   122104 use common::sense;
  5         7  
  5         37  
4              
5 5     5   616 use Aion::Meta::Util qw//;
  5         7  
  5         1197  
6              
7             Aion::Meta::Util::create_getters(qw/pkg name/);
8              
9             sub new {
10 5     5 1 140930 my $cls = shift;
11 5   33     36 bless {@_}, ref $cls || $cls;
12             }
13              
14             sub compare {
15 3     3 1 25 my ($self, $other) = @_;
16              
17 3 100       11 die "Requires ${\ $self->stringify}" unless ref $other eq 'CODE';
  2         9  
18             }
19              
20             sub stringify {
21 3     3 1 9 my ($self) = @_;
22              
23 3         40 return "$self->{name} of $self->{pkg}";
24             }
25              
26             1;
27              
28             __END__