File Coverage

blib/lib/Moose/Exception/MatchActionMustBeACodeRef.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::MatchActionMustBeACodeRef;
2             our $VERSION = '2.2203';
3              
4 1     1   577 use Moose;
  1         3  
  1         6  
5             extends 'Moose::Exception';
6             with 'Moose::Exception::Role::TypeConstraint';
7              
8             has 'to_match' => (
9             is => 'ro',
10             isa => 'Any',
11             required => 1,
12             );
13              
14             has 'action' => (
15             is => 'ro',
16             isa => 'Any',
17             required => 1
18             );
19              
20             sub _build_message {
21 1     1   3 my $self = shift;
22 1         26 my $action = $self->action;
23              
24 1         20 return "Match action must be a CODE ref, not $action";
25             }
26              
27             __PACKAGE__->meta->make_immutable;
28             1;