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

VERSION

10       version 2.2201
11

DESCRIPTION

13       This class represents type constraints for a class.
14

INHERITANCE

16       "Moose::Meta::TypeConstraint::Class" is a subclass of
17       Moose::Meta::TypeConstraint.
18

METHODS

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

BUGS

58       See "BUGS" in Moose for details on reporting bugs.
59

AUTHORS

61       •   Stevan Little <stevan@cpan.org>
62
63       •   Dave Rolsky <autarch@urth.org>
64
65       •   Jesse Luehrs <doy@cpan.org>
66
67       •   Shawn M Moore <sartak@cpan.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@cpan.org>
76
77       •   Chris Prather <chris@prather.org>
78
79       •   Matt S Trout <mstrout@cpan.org>
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.36.0                      2022-07-M2o2ose::Meta::TypeConstraint::Class(3)
Impressum