X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint%2FClass.pm;h=8447570a60d927092959944afcdd780ceb336aa1;hb=refs%2Ftags%2F0.66;hp=4d63b09ccf839c9fa69f9cd77dd4a3bfcdf0327a;hpb=4c015454152fff7c0a2c71665d4dc5e0f39b835b;p=gitmo%2FMoose.git
diff --git a/lib/Moose/Meta/TypeConstraint/Class.pm b/lib/Moose/Meta/TypeConstraint/Class.pm
index 4d63b09..8447570 100644
--- a/lib/Moose/Meta/TypeConstraint/Class.pm
+++ b/lib/Moose/Meta/TypeConstraint/Class.pm
@@ -7,7 +7,7 @@ use metaclass;
use Scalar::Util 'blessed';
use Moose::Util::TypeConstraints ();
-our $VERSION = '0.57';
+our $VERSION = '0.66';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
@@ -97,6 +97,15 @@ sub is_subtype_of {
}
}
+# This is a bit counter-intuitive, but a child type of a Class type
+# constraint is not itself a Class type constraint (it has no class
+# attribute). This whole create_child_type thing needs some changing
+# though, probably making MMC->new a factory or something.
+sub create_child_type {
+ my ($self, @args) = @_;
+ return Moose::Meta::TypeConstraint->new(@args, parent => $self);
+}
+
1;
__END__
@@ -131,6 +140,8 @@ Return all the parent types, corresponding to the parent classes.
=item B
+=item B
+
=back
=head1 BUGS
@@ -145,7 +156,7 @@ Yuval Kogman Enothingmuch@cpan.orgE
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
L