Skip to content

Commit 0ba2375

Browse files
committed
[Any, Code] move signatures out of headlines
eventually I want to link to methods in a class like doc.perl6.org/type/Code#signature so it makes sense to have only the method name as a heading
1 parent 7988a7c commit 0ba2375

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

lib/Any.pod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ most built-in classes.
1010
1111
=head2 Methods
1212
13-
=head3 ACCEPTS(Any:D: Mu $other)
13+
=head3 ACCEPTS
14+
15+
multi method ACCEPTS(Any:D: Mu $other)
1416
1517
Returns C<True> if C<$other === self> (ie it checks object identity).
1618

lib/Code.pod

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ from blocks, subroutines or methods) will be of some subclass of C<Code>.
1212
1313
=head2 Methods
1414
15-
=head3 ACCEPTS(Code:D: Mu $topic)
15+
=head3 ACCEPTS
16+
17+
multi method ACCEPTS(Code:D: Mu $topic)
1618
1719
Usually calls the code object and passes C<$topic> as an argument.
1820
However, when called on a code object that takes no arguments, the code
1921
object is invoked with no arguments and C<$topic> is dropped. The
2022
result of the call is returned.
2123
22-
=head3 arity(Code:D:) returns Int:D
24+
=head3 arity
25+
26+
method arity(Code:D:) returns Int:D
2327
2428
Returns the minimum number of positional arguments that must be passed
2529
in order to call the code object. Any optional or slurpy parameters in the
@@ -32,7 +36,9 @@ code object's C<Signature> do not contribute, nor do named parameters.
3236
say &args.arity; # 1
3337
say &slurpy.arity; # 2
3438
35-
=head3 count(Code:D:) returns Real:D
39+
=head3 count
40+
41+
method count(Code:D:) returns Real:D
3642
3743
Returns the maximum number of positional arguments that may be passed
3844
when calling the code object. For code objects that can accept any
@@ -46,12 +52,16 @@ C<count> will return C<Inf>. Named parameters do not contribute.
4652
say &args.count; # 2
4753
say &slurpy.count; # Inf
4854
49-
=head3 signature(Code:D:) returns Signature:D
55+
=head3 signature
56+
57+
multi method signature(Code:D:) returns Signature:D
5058
5159
Returns the C<Signature> object for this code object, which describes
5260
its parameters.
5361
54-
=head3 Str(Code:D:) returns Str:D
62+
=head3 Str
63+
64+
multi method Str(Code:D:) returns Str:D
5565
5666
Returns the name of the code object.
5767

0 commit comments

Comments
 (0)