X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint%2FClass.pm;h=433daa5b638961b55f4623f7de7da750c9b1fede;hb=d7d8f2eed4661bacfe2b2b4544ddb40db84a6c1a;hp=ed4d8cb2f3cf4281443341a078c17c353f42d48b;hpb=4b2189ce8dae168787b635b71a918bd64461ed7a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeConstraint/Class.pm b/lib/Moose/Meta/TypeConstraint/Class.pm index ed4d8cb..433daa5 100644 --- a/lib/Moose/Meta/TypeConstraint/Class.pm +++ b/lib/Moose/Meta/TypeConstraint/Class.pm @@ -116,31 +116,56 @@ __END__ Moose::Meta::TypeConstraint::Class - Class/TypeConstraint parallel hierarchy +=head1 DESCRIPTION + +This class represents type constraints for a class. + +=head1 INHERITANCE + +C is a subclass of +L. + =head1 METHODS =over 4 -=item B +=item B<< Moose::Meta::TypeConstraint::Class->new(%options) >> + +This creates a new class type constraint based on the given +C<%options>. + +It takes the same options as its parent, with two exceptions. First, +it requires an additional option, C, which is name of the +constraint's class. Second, it automatically sets the parent to the +C type. + +The constructor also overrides the hand optimized type constraint with +one it creates internally. -=item B +=item B<< $constraint->class >> -=item B +Returns the class name associated with the constraint. -=item B +=item B<< $constraint->parents >> -=item B +Returns all the type's parent types, corresponding to its parent +classes. -=item B +=item B<< $constraint->is_a_subtype_of($type_name_or_object) >> -=item B +If the given type is also a class type, then this checks that the +type's class is a subclass of the other type's class. -=item B +Otherwise it falls back to the implement in +L. -Return all the parent types, corresponding to the parent classes. +=item B<< $constraint->create_child_type(%options) >> -=item B +This returns a new L object with the type +as its parent. -=item B +Note that it does I return a +C object! =back