blib/lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
_build_message
1.0
CRAP 1.0
« blib/lib/Moose/Exception/MustSupplyPackageNameAndName.pm ↑ Summary blib/lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm »
1 package Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion;
2 1 our $VERSION = '2.4001';
3  
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 extends 'Moose::Exception';
6 1 with 'Moose::Exception::Role::TypeConstraint';
7  
8 # use Moose::Util::TypeConstraints 'find_type_constraint';
9  
10 1 has 'type_coercion_union_object' => (
11 is => 'ro',
12 isa => 'Moose::Meta::TypeCoercion::Union',
13 required => 1
14 );
15  
16 1 ▶sub _build_message {
Subroutine _build_message: called CC=1 SCAR=0.0
17 1 my $self = shift;
18 1 my $type_constraint = $self->type_name;
19  
20 1 return "You can only create a Moose::Meta::TypeCoercion::Union for a " .
21 "Moose::Meta::TypeConstraint::Union, not a $type_constraint"
22 }
23  
24 1 __PACKAGE__->meta->make_immutable;
25 1 1;
« blib/lib/Moose/Exception/MustSupplyPackageNameAndName.pm ↑ Summary blib/lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm »