Fix pod coverage test to actually exclude things that should be
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Parameterizable.pm
index e12ada3..e020b8c 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use metaclass;
 
-our $VERSION   = '0.65';
+our $VERSION   = '0.72';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -57,8 +57,10 @@ sub parameterize {
     
     if(my $parent = $self->parent) {
         if($parent->can('type_parameter')) {
-            $contained_tc->is_a_type_of($parent->type_parameter)
-             || Moose->throw_error("$type_parameter is not a subtype of ".$parent->type_parameter);
+            unless ( $contained_tc->is_a_type_of($parent->type_parameter) ) {
+                require Moose;
+                Moose->throw_error("$type_parameter is not a subtype of ".$parent->type_parameter);
+            }
         }
     }
 
@@ -71,6 +73,7 @@ sub parameterize {
         );
     }
     else {
+        require Moose;
         Moose->throw_error("The type parameter must be a Moose meta type");
     }
 }
@@ -118,7 +121,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>