Skip to content

Commit 753a50d

Browse files
authored
Revert "New pod config option: 'signature'"
1 parent ab1f2b0 commit 753a50d

File tree

18 files changed

+122
-348
lines changed

18 files changed

+122
-348
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,6 @@ To export examples from all .pod6-files use `make extract-examples`. To run
9797
individual tests pick the right .p6-file from `examples/` as a parameter to
9898
`perl6`.
9999

100-
### Signatures
101-
102-
Signatures are part of actual code and need to be tested too. But without the body every
103-
signature will cause an error during the test. Use the pod-config option `signature` to
104-
automatically add an empty body.
105-
106-
=begin code :signature
107-
method new(*@codes)
108-
=end code
109-
110100
### Skipping tests
111101

112102
Some examples fail with compile time exceptions and would interrupt the test

doc/Type/Any.pod6

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ List or a list-like type.
2020
2121
Defined as:
2222
23-
=begin code :signature
24-
multi method ACCEPTS(Any:D: Mu $other)
25-
=end code
23+
multi method ACCEPTS(Any:D: Mu $other) {}
2624
2725
Usage:
2826
@@ -38,9 +36,7 @@ Many built-in types override this for more specific comparisons
3836
3937
Defined as:
4038
41-
=begin code :signature
42-
method any() returns Junction:D
43-
=end code
39+
method any() returns Junction:D {}
4440
4541
Usage:
4642
@@ -58,9 +54,7 @@ C<any>-L<Junction|/type/Junction> from it.
5854
5955
Defined as:
6056
61-
=begin code :signature
62-
method all() returns Junction:D
63-
=end code
57+
method all() returns Junction:D {}
6458
6559
Usage:
6660
@@ -78,9 +72,7 @@ C<all>-L<Junction|/type/Junction> from it.
7872
7973
Defined as:
8074
81-
=begin code :signature
82-
method one() returns Junction:D
83-
=end code
75+
method one() returns Junction:D {}
8476
8577
Usage:
8678
@@ -98,9 +90,7 @@ C<one>-L<Junction|/type/Junction> from it.
9890
9991
Defined as:
10092
101-
=begin code :signature
102-
method none() returns Junction:D
103-
=end code
93+
method none() returns Junction:D {}
10494
10595
Usage:
10696
@@ -137,10 +127,8 @@ into the newly created Array.
137127
138128
Defined as:
139129
140-
=begin code :signature
141-
multi sub reverse(*@list ) returns List:D
142-
multi method reverse(List:D:) returns List:D
143-
=end code
130+
multi sub reverse(*@list ) returns List:D {}
131+
multi method reverse(List:D:) returns List:D {}
144132
145133
Usage:
146134
@@ -175,10 +163,8 @@ Examples:
175163
Defined as:
176164
177165
proto method map(|) is nodal { * }
178-
=begin code :signature
179-
multi method map(\SELF: &block;; :$label, :$item)
180-
multi method map(HyperIterable:D: &block;; :$label)
181-
=end code
166+
multi method map(\SELF: &block;; :$label, :$item) {}
167+
multi method map(HyperIterable:D: &block;; :$label) {}
182168
183169
C<map> will iterate over the invocant and apply the number of positional
184170
parameters of the code object from the invocant per call. The returned values
@@ -188,9 +174,7 @@ of the code object will become elements of the returned C<Seq>.
188174
189175
Defined as:
190176
191-
=begin code :signature
192-
method deepmap(&block -->List) is nodal
193-
=end code
177+
method deepmap(&block -->List) is nodal {}
194178
195179
C<deepmap> will apply C<&block> to each element and return a new C<List> with
196180
the return values of C<&block>, unless the element does the C<Iterable> role.
@@ -203,9 +187,7 @@ For those elements C<deepmap> will descend recursively into the sublist.
203187
204188
Defined as:
205189
206-
=begin code :signature
207-
method duckmap(&block) is rw is nodal
208-
=end code
190+
method duckmap(&block) is rw is nodal {}
209191
210192
C<duckmap> will apply C<&block> on each element and return a new list with
211193
defined return values of the block. For undefined return values, C<duckmap>
@@ -264,9 +246,7 @@ Interprets the invocant as a list, and returns the last index of that list.
264246
265247
=head2 method pairup
266248
267-
=begin code :signature
268-
method pairup() returns List
269-
=end code
249+
method pairup() returns List {}
270250
271251
Interprets the invocant as a list, and constructs a list of
272252
L<pairs|/type/Pair> from it, in the same way that assignment to a
@@ -279,9 +259,7 @@ list item, if any, is considered to be a key again).
279259
280260
=head2 sub exit
281261
282-
=begin code :signature
283-
sub exit(Int() $status = 0)
284-
=end code
262+
sub exit(Int() $status = 0) {}
285263
286264
Exits the current process with return code C<$status>.
287265

doc/Type/Array.pod6

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ scalar containers, which means you can assign to array elements.
1515
1616
Defined as:
1717
18-
=begin code :signature
19-
multi sub pop(Array:D )
20-
multi method pop(Array:D:)
21-
=end code
18+
multi sub pop(Array:D ) {}
19+
multi method pop(Array:D:) {}
2220
2321
Usage:
2422
@@ -42,10 +40,8 @@ Example:
4240
4341
Defined as:
4442
45-
=begin code :signature
46-
multi sub push(Array:D, **@values) returns Array:D
47-
multi method push(Array:D: **@values) returns Array:D
48-
=end code
43+
multi sub push(Array:D, **@values) returns Array:D {}
44+
multi method push(Array:D: **@values) returns Array:D {}
4945
5046
Usage:
5147
@@ -92,11 +88,8 @@ Defined as
9288
=begin code :skip-test
9389
sub append(\array, elems)
9490
=end code
95-
=begin code :signature
96-
multi method append(Array:D: \values)
97-
multi method append(Array:D: **@values is raw)
98-
=end code
99-
91+
multi method append(Array:D: \values) {}
92+
multi method append(Array:D: **@values is raw) {}
10093
10194
Usage:
10295
@@ -124,10 +117,8 @@ Example:
124117
125118
Defined as:
126119
127-
=begin code :signature
128-
multi sub shift(Array:D )
129-
multi method shift(Array:D:)
130-
=end code
120+
multi sub shift(Array:D ) {}
121+
multi method shift(Array:D:) {}
131122
132123
Usage:
133124
@@ -151,11 +142,8 @@ Example:
151142
152143
Defined as:
153144
154-
=begin code :signature
155-
multi sub unshift(Array:D, **@values) returns Array:D
156-
multi method unshift(Array:D: **@values) returns Array:D
157-
=end code
158-
145+
multi sub unshift(Array:D, **@values) returns Array:D {}
146+
multi method unshift(Array:D: **@values) returns Array:D {}
159147
160148
Usage:
161149
@@ -187,11 +175,8 @@ Defined as
187175
=begin code :skip-test
188176
sub prepend(\array, elems)
189177
=end code
190-
=begin code :signature
191-
multi method prepend(Array:D: \values)
192-
multi method prepend(Array:D: **@values is raw)
193-
=end code
194-
178+
multi method prepend(Array:D: \values) {}
179+
multi method prepend(Array:D: **@values is raw) {}
195180
196181
Usage:
197182
@@ -213,11 +198,8 @@ Example:
213198
214199
Defined as:
215200
216-
=begin code :signature
217-
multi sub splice(@list, $start, $elems?, *@replacement) returns Array
218-
multi method splice(Array:D $start, $elems?, *@replacement) returns Array
219-
=end code
220-
201+
multi sub splice(@list, $start, $elems?, *@replacement) returns Array {}
202+
multi method splice(Array:D $start, $elems?, *@replacement) returns Array {}
221203
222204
Usage:
223205
@@ -261,9 +243,7 @@ Example:
261243
262244
Defined as:
263245
264-
=begin code :signature
265-
method default
266-
=end code
246+
method default {}
267247
268248
Usage:
269249
@@ -292,9 +272,7 @@ the type object C<(Any)>.
292272
293273
Defined as:
294274
295-
=begin code :signature
296-
method of
297-
=end code
275+
method of {}
298276
299277
Usage:
300278

doc/Type/Attribute.pod6

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ The usual way to obtain an object of type C<Attribute> is by introspection:
3636
3737
Defined as:
3838
39-
=begin code :signature
40-
method name(Attribute:D:) returns Str:D
41-
=end code
39+
method name(Attribute:D:) returns Str:D {}
4240
4341
Usage:
4442
@@ -53,9 +51,7 @@ so if an attribute is declared as C<has $.a>, the name returned is C<$!a>.
5351
5452
Defined as:
5553
56-
=begin code :signature
57-
method package(Attribute:D:) returns Mu:U
58-
=end code
54+
method package(Attribute:D:) returns Mu:U {}
5955
6056
Usage:
6157
@@ -69,9 +65,7 @@ Returns the package (class/grammar/role) to which this attribute belongs.
6965
7066
Defined as:
7167
72-
=begin code :signature
73-
method has_accessor(Attribute:D:) returns Bool:D
74-
=end code
68+
method has_accessor(Attribute:D:) returns Bool:D {}
7569
7670
Usage:
7771
@@ -85,9 +79,7 @@ Returns C<True> if the attribute has a public accessor method.
8579
8680
Defined as:
8781
88-
=begin code :signature
89-
method readonly(Attribute:D:) returns Bool:D
90-
=end code
82+
method readonly(Attribute:D:) returns Bool:D {}
9183
9284
Usage:
9385
@@ -102,9 +94,7 @@ Returns C<False> for attributes marked as C<is rw>.
10294
10395
Defined as:
10496
105-
=begin code :signature
106-
method type(Attribute:D:) returns Mu
107-
=end code
97+
method type(Attribute:D:) returns Mu {}
10898
10999
Usage:
110100
@@ -118,9 +108,7 @@ Returns the type constraint of the attribute.
118108
119109
Defined as:
120110
121-
=begin code :signature
122-
method get_value(Attribute:D: Mu $instance)
123-
=end code
111+
method get_value(Attribute:D: Mu $instance) {}
124112
125113
Usage:
126114
@@ -137,9 +125,7 @@ used with care. Here be dragons.
137125
138126
Defined as:
139127
140-
=begin code :signature
141-
method set_value(Attribute:D: Mu $instance, Mu \new_val)
142-
=end code
128+
method set_value(Attribute:D: Mu $instance, Mu \new_val) {}
143129
144130
Usage:
145131
@@ -154,9 +140,7 @@ used with care. Here be dragons.
154140
155141
=head2 trait is required
156142
157-
=begin code :signature
158-
multi sub trait_mod:<is> (Attribute $attr, :$required!)
159-
=end code
143+
multi sub trait_mod:<is> (Attribute $attr, :$required!) {}
160144
161145
Marks an attribute as being required. If a value is not provided
162146
during object construction, an exception is thrown.
@@ -178,9 +162,7 @@ constructors written using L<bless>.
178162
179163
=head2 trait is rw
180164
181-
=begin code :signature
182-
multi sub trait_mod:<is> (Attribute:D $attr, :$rw!)
183-
=end code
165+
multi sub trait_mod:<is> (Attribute:D $attr, :$rw!) {}
184166
185167
Marks an attribute as read/write as opposed to the default
186168
C<readonly>. The default accessor for the attribute will return a

0 commit comments

Comments
 (0)