1Moose::Meta::TypeConstrUasienrt:C:oRnotlrei(b3u)ted PerlMoDoosceu:m:eMnettaat:i:oTnypeConstraint::Role(3)
2
3
4

NAME

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

VERSION

10       version 2.2201
11

DESCRIPTION

13       This class represents type constraints for a role.
14

INHERITANCE

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

METHODS

20   Moose::Meta::TypeConstraint::Role->new(%options)
21       This creates a new role 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, "role", which is name of the
25       constraint's role.  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->role
32       Returns the role name associated with the constraint.
33
34   $constraint->parents
35       Returns all the type's parent types, corresponding to the roles that
36       its role does.
37
38   $constraint->is_subtype_of($type_name_or_object)
39       If the given type is also a role type, then this checks that the type's
40       role does the other type's role.
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::Role"
50       object!
51

BUGS

53       See "BUGS" in Moose for details on reporting bugs.
54

AUTHORS

56       •   Stevan Little <stevan@cpan.org>
57
58       •   Dave Rolsky <autarch@urth.org>
59
60       •   Jesse Luehrs <doy@cpan.org>
61
62       •   Shawn M Moore <sartak@cpan.org>
63
64       •   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
65
66       •   Karen Etheridge <ether@cpan.org>
67
68       •   Florian Ragwitz <rafl@debian.org>
69
70       •   Hans Dieter Pearcey <hdp@cpan.org>
71
72       •   Chris Prather <chris@prather.org>
73
74       •   Matt S Trout <mstrout@cpan.org>
75
77       This software is copyright (c) 2006 by Infinity Interactive, Inc.
78
79       This is free software; you can redistribute it and/or modify it under
80       the same terms as the Perl 5 programming language system itself.
81
82
83
84perl v5.36.0                      2022-07-2M2oose::Meta::TypeConstraint::Role(3)
Impressum