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

DESCRIPTION

10       This class represents type constraints for a role.
11

INHERITANCE

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

METHODS

17       Moose::Meta::TypeConstraint::Role->new(%options)
18           This creates a new role 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, "role", which is name of
23           the constraint's role.  Second, it automatically sets the parent to
24           the "Object" type.
25
26           The constructor also overrides the hand optimized type constraint
27           with one it creates internally.
28
29       $constraint->role
30           Returns the role name associated with the constraint.
31
32       $constraint->parents
33           Returns all the type's parent types, corresponding to the roles
34           that its role does.
35
36       $constraint->is_subtype_of($type_name_or_object)
37           If the given type is also a role type, then this checks that the
38           type's role does the other type's role.
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::Role"
48           object!
49

BUGS

51       See "BUGS" in Moose for details on reporting bugs.
52

AUTHOR

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