Skip to content

Commit 9fed358

Browse files
committed
document X::Attribute::Package
1 parent d1af529 commit 9fed358

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

lib/X/Attribute/Package.pod

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=begin pod
2+
3+
=TITLE class X::Attribute::Package
4+
5+
class X::Attribute::Package does X::Comp { }
6+
7+
Compile time error, thrown when the compiler encounters an attribute
8+
declaration inside a package that does not support attributes.
9+
10+
For example
11+
12+
module A { has $.x }
13+
14+
dies with
15+
16+
===SORRY!===
17+
A module cannot have attributes
18+
19+
=head1 Methods
20+
21+
=head2 package-kind
22+
23+
method package-kind() returns Str:D
24+
25+
Returns the kind of package (package, module) that doesn't support attributes.
26+
27+
=end pod

0 commit comments

Comments
 (0)