make sure these are defined
Jesse Luehrs [Thu, 21 Apr 2011 21:32:14 +0000 (16:32 -0500)]
lib/Moose/Meta/TypeConstraint/Parameterized.pm

index c8c887a..61db448 100644 (file)
@@ -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 })
+            : ()),
     };
 }