1Mouse::Role(3) User Contributed Perl Documentation Mouse::Role(3)
2
3
4
6 Mouse::Role - The Mouse Role
7
9 This document describes Mouse version 0.58
10
12 package MyRole;
13 use Mouse::Role;
14
16 "meta -> Mouse::Meta::Role"
17 Returns this role's metaclass instance.
18
19 "before (method|methods|regexp) -> CodeRef"
20 Sets up a before method modifier. See "before" in Moose.
21
22 "after (method|methods|regexp) => CodeRef"
23 Sets up an after method modifier. See "after" in Moose.
24
25 "around (method|methods|regexp) => CodeRef"
26 Sets up an around method modifier. See "around" in Moose.
27
28 "super"
29 Sets up the super keyword. See "super" in Moose.
30
31 "override method => CodeRef"
32 Sets up an override method modifier. See "Role/override" in Moose.
33
34 "inner"
35 This is not supported in roles and emits an error. See "Role" in Moose.
36
37 "augment method => CodeRef"
38 This is not supported in roles and emits an error. See "Role" in Moose.
39
40 "has (name|names) => parameters"
41 Sets up an attribute (or if passed an arrayref of names, multiple
42 attributes) to this role. See "has" in Mouse.
43
44 "confess(error) -> BOOM"
45 "confess" in Carp for your convenience.
46
47 "blessed(value) -> ClassName | undef"
48 "blessed" in Scalar::Util for your convenience.
49
51 import
52 Importing Mouse::Role will give you sugar.
53
54 unimport
55 Please unimport ("no Mouse::Role") so that if someone calls one of the
56 keywords (such as "has") it will break loudly instead breaking subtly.
57
59 Moose::Role
60
61
62
63perl v5.12.0 2010-05-08 Mouse::Role(3)