Skip to content

Commit 88f9b26

Browse files
committed
document X::Does::TypeObject
1 parent 3c20a9f commit 88f9b26

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/Type/X/Does/TypeObject.pod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
=begin pod
2+
3+
=TITLE class X::Does::TypeObject
4+
5+
=SUBTITLE Error thrown when trying to mix into a type object
6+
7+
class X::Does::TypeObject is Exception { ... }
8+
9+
When you try to add one or more roles to a type object with C<does> after it
10+
has been composed, an error of type C<X::Does::TypeObject> is thrown:
11+
12+
Mu does Numeric; # Cannot use 'does' operator with a type object.
13+
14+
The correct way to applies roles to type objects is at declaration time:
15+
16+
class GrassmannNumber does Numeric { ... }
17+
18+
=end pod

0 commit comments

Comments
 (0)