File Coverage

blib/lib/Moose/Exception/CircularReferenceInAlso.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::CircularReferenceInAlso;
2             our $VERSION = '2.2206';
3              
4 2     2   1260 use Moose;
  2         8  
  2         14  
5             extends 'Moose::Exception';
6              
7             has 'also_parameter' => (
8             is => 'ro',
9             isa => 'Str',
10             required => 1
11             );
12              
13             has 'stack' => (
14             is => 'ro',
15             isa => 'ArrayRef',
16             required => 1
17             );
18              
19             sub _build_message {
20 2     2   5 my $self = shift;
21 2         83 my $also_member = $self->also_parameter;
22              
23 2         5 my @stack = @{$self->stack};
  2         63  
24 2         6 my $existing_stack = join( ', ', @stack);
25              
26 2         52 return "Circular reference in 'also' parameter to Moose::Exporter between "
27             ."$existing_stack and $also_member";
28             }
29              
30             __PACKAGE__->meta->make_immutable;
31             1;