File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ = begin pod
2
+
3
+ = TITLE class X::Syntax::Augment::Role
4
+
5
+ class X::Syntax::Augment::Role does X::Syntax { }
6
+
7
+ Compile time error thrown when trying to agument a role.
8
+
9
+ For example
10
+
11
+ use MONKEY_TYPING;
12
+ augment role Positional { }
13
+
14
+ dies with
15
+
16
+ ===SORRY!===
17
+ Cannot augment role Positional, since roles are immutable
18
+
19
+ = head1 Methods
20
+
21
+ = head2 role-name
22
+
23
+ method role-name() returns Str:D
24
+
25
+ Returns the name of the role that was attempted to augment.
26
+
27
+ = end pod
Original file line number Diff line number Diff line change
1
+ = begin pod
2
+
3
+ = TITLE class X::Syntax::Augment::WithoutMonkeyTyping
4
+
5
+ class X::Syntax::Augment::WithoutMonkeyTyping does X::Syntax { }
6
+
7
+ Compile time error thrown when C < augment > is used without C < use MONKEY_TYPING > .
8
+
9
+ Since C < augment > is considered a rather unsafe and impolate action, you have
10
+ to pre-declare your intent with the C < use MONKEY_TYPING; > pragma.
11
+
12
+ If you don't do that, for example
13
+
14
+ augment class Int { };
15
+
16
+ you get the error
17
+
18
+ ===SORRY!===
19
+ augment not allowed without 'use MONKEY_TYPING'
20
+
21
+ = end pod
You can’t perform that action at this time.
0 commit comments