From: Jesse Luehrs Date: Thu, 21 Apr 2011 21:32:14 +0000 (-0500) Subject: make sure these are defined X-Git-Tag: 2.0100~41 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9bc213831dee2cab7a4faf513e38c774df8e8ef1;p=gitmo%2FMoose.git make sure these are defined --- diff --git a/lib/Moose/Meta/TypeConstraint/Parameterized.pm b/lib/Moose/Meta/TypeConstraint/Parameterized.pm index c8c887a..61db448 100644 --- a/lib/Moose/Meta/TypeConstraint/Parameterized.pm +++ b/lib/Moose/Meta/TypeConstraint/Parameterized.pm @@ -76,8 +76,12 @@ sub inline_environment { my $self = shift; return { - %{ $self->parameterized_from->inline_environment }, - %{ $self->type_parameter->inline_environment }, + ($self->has_parameterized_from + ? (%{ $self->parameterized_from->inline_environment }) + : ()), + ($self->has_type_parameter + ? (%{ $self->type_parameter->inline_environment }) + : ()), }; }