1Moose::Meta::TypeConstrUasienrt:C:oCnltarsisb(u3t)ed PerMlooDsoec:u:mMeenttaa:t:iToynpeConstraint::Class(3)
2
3
4

NAME

6       Moose::Meta::TypeConstraint::Class - Class/TypeConstraint parallel
7       hierarchy
8

DESCRIPTION

10       This class represents type constraints for a class.
11

INHERITANCE

13       "Moose::Meta::TypeConstraint::Class" is a subclass of
14       Moose::Meta::TypeConstraint.
15

METHODS

17       Moose::Meta::TypeConstraint::Class->new(%options)
18           This creates a new class type constraint based on the given
19           %options.
20
21           It takes the same options as its parent, with two exceptions.
22           First, it requires an additional option, "class", which is name of
23           the constraint's class.  Second, it automatically sets the parent
24           to the "Object" type.
25
26           The constructor also overrides the hand optimized type constraint
27           with one it creates internally.
28
29       $constraint->class
30           Returns the class name associated with the constraint.
31
32       $constraint->parents
33           Returns all the type's parent types, corresponding to its parent
34           classes.
35
36       $constraint->is_subtype_of($type_name_or_object)
37           If the given type is also a class type, then this checks that the
38           type's class is a subclass of the other type's class.
39
40           Otherwise it falls back to the implementation in
41           Moose::Meta::TypeConstraint.
42
43       $constraint->create_child_type(%options)
44           This returns a new Moose::Meta::TypeConstraint object with the type
45           as its parent.
46
47           Note that it does not return a "Moose::Meta::TypeConstraint::Class"
48           object!
49
50       $constraint->get_message($value)
51           This is the same as "get_message" in Moose::Meta::TypeConstraint
52           except that it explicitly says "isa" was checked. This is to help
53           users deal with accidentally autovivified type constraints.
54

BUGS

56       See "BUGS" in Moose for details on reporting bugs.
57

AUTHOR

59       Yuval Kogman <nothingmuch@cpan.org>
60
62       Copyright 2006-2010 by Infinity Interactive, Inc.
63
64       <http://www.iinteractive.com>
65
66       This library is free software; you can redistribute it and/or modify it
67       under the same terms as Perl itself.
68
69
70
71perl v5.12.2                      2010-08-M2o8ose::Meta::TypeConstraint::Class(3)
Impressum