blib/lib/Moose/Exception/CircularReferenceInAlso.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
_build_message
1.0
CRAP 1.0
« blib/lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm ↑ Summary blib/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm »
1 package Moose::Exception::CircularReferenceInAlso;
2 3 our $VERSION = '2.4001';
3  
4 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 extends 'Moose::Exception';
6  
7 3 has 'also_parameter' => (
8 is => 'ro',
9 isa => 'Str',
10 required => 1
11 );
12  
13 3 has 'stack' => (
14 is => 'ro',
15 isa => 'ArrayRef',
16 required => 1
17 );
18  
19 3 ▶sub _build_message {
Subroutine _build_message: called CC=1 SCAR=0.0
20 3 my $self = shift;
21 3 my $also_member = $self->also_parameter;
22  
23 3 my @stack = @{$self->stack};
24 3 my $existing_stack = join( ', ', @stack);
25  
26 3 return "Circular reference in 'also' parameter to Moose::Exporter between "
27 ."$existing_stack and $also_member";
28 }
29  
30 3 __PACKAGE__->meta->make_immutable;
31 3 1;
« blib/lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm ↑ Summary blib/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm »