File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 7
7
class Submethod is Routine {}
8
8
9
9
A Submethod is a method that is not inherited by child classes. They are
10
- typically used for per-class initialization and tear-down tasks which are
11
- called explicitly per class in an inheritance tree, usually for enforcing a
12
- particular order. For example object construction with the C < BUILD > submethod
13
- happens from the least-derived to most-derived, so that the most-derived
14
- (child) classes can depend on the parent already being initialized.
10
+ typically used for per-class initialization and tear-down tasks which
11
+ are called explicitly per class in an inheritance tree, usually for
12
+ enforcing a particular order. For example object construction with the
13
+ C < BUILD > submethod happens from the least-derived to most-derived, so
14
+ that the most-derived (child) classes can depend on the parent already
15
+ being initialized.
15
16
16
- Submethods are of type C < Submethod > , and are declared with the C < submethod >
17
- declarator:
17
+ Submethods are of type C < Submethod > , and are declared with the
18
+ C < submethod > declarator:
18
19
19
20
class Area {
20
21
has $.size;
@@ -25,7 +26,13 @@ declarator:
25
26
26
27
= head1 Methods
27
28
28
- = comment TODO
29
+ = head2 method gist
30
+
31
+ Defined as:
32
+
33
+ multi method gist(Submethod:D:)
34
+
35
+ Returns the name of the submethod.
29
36
30
37
= end pod
31
38
You can’t perform that action at this time.
0 commit comments