1Moose::Meta::TypeConstrUasienrt:C:oCnltarsisb(u3t)ed PerMlooDsoec:u:mMeenttaa:t:iToynpeConstraint::Class(3)
2
3
4
6 Moose::Meta::TypeConstraint::Class - Class/TypeConstraint parallel
7 hierarchy
8
10 version 2.2013
11
13 This class represents type constraints for a class.
14
16 "Moose::Meta::TypeConstraint::Class" is a subclass of
17 Moose::Meta::TypeConstraint.
18
20 Moose::Meta::TypeConstraint::Class->new(%options)
21 This creates a new class type constraint based on the given %options.
22
23 It takes the same options as its parent, with two exceptions. First, it
24 requires an additional option, "class", which is name of the
25 constraint's class. Second, it automatically sets the parent to the
26 "Object" type.
27
28 The constructor also overrides the hand optimized type constraint with
29 one it creates internally.
30
31 $constraint->class
32 Returns the class name associated with the constraint.
33
34 $constraint->parents
35 Returns all the type's parent types, corresponding to its parent
36 classes.
37
38 $constraint->is_subtype_of($type_name_or_object)
39 If the given type is also a class type, then this checks that the
40 type's class is a subclass of the other type's class.
41
42 Otherwise it falls back to the implementation in
43 Moose::Meta::TypeConstraint.
44
45 $constraint->create_child_type(%options)
46 This returns a new Moose::Meta::TypeConstraint object with the type as
47 its parent.
48
49 Note that it does not return a "Moose::Meta::TypeConstraint::Class"
50 object!
51
52 $constraint->get_message($value)
53 This is the same as "get_message" in Moose::Meta::TypeConstraint except
54 that it explicitly says "isa" was checked. This is to help users deal
55 with accidentally autovivified type constraints.
56
58 See "BUGS" in Moose for details on reporting bugs.
59
61 · Stevan Little <stevan.little@iinteractive.com>
62
63 · Dave Rolsky <autarch@urth.org>
64
65 · Jesse Luehrs <doy@tozt.net>
66
67 · Shawn M Moore <code@sartak.org>
68
69 · יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
70
71 · Karen Etheridge <ether@cpan.org>
72
73 · Florian Ragwitz <rafl@debian.org>
74
75 · Hans Dieter Pearcey <hdp@weftsoar.net>
76
77 · Chris Prather <chris@prather.org>
78
79 · Matt S Trout <mst@shadowcat.co.uk>
80
82 This software is copyright (c) 2006 by Infinity Interactive, Inc.
83
84 This is free software; you can redistribute it and/or modify it under
85 the same terms as the Perl 5 programming language system itself.
86
87
88
89perl v5.32.0 2020-07-M2o8ose::Meta::TypeConstraint::Class(3)