@@ -19,16 +19,6 @@ implemented using L<roles|#Role> with L<stubbed|#Stub> methods.
19
19
method bark { say "woof" } # *MUST* be implemented by class
20
20
}
21
21
22
- = head1 Actions
23
- X < |Actions >
24
-
25
- Action methods are typically used to perform transformations and
26
- other actions while parsing a source code program. Parse grammars
27
- typically use the special token C < {*} > to indicate the point
28
- at which an action method is to be invoked. In addition, a line
29
- containing C < {*} > may also use C < #= > to specify a "key" that
30
- is to be passed to the action method.
31
-
32
22
= head1 Advent Calendar
33
23
X < |Advent Calendar >
34
24
@@ -129,16 +119,6 @@ initial barrage of RFC's that came out of the Perl community. Now only kept
129
119
as an historical document for reference. See also L < #Exegesis > and
130
120
L < #Synopsis > .
131
121
132
- = head1 Argument
133
- X < |Argument >
134
-
135
- A value that you pass on to a L < subroutine|#Subroutine > , L < method|#Method >
136
- or a L < callable block|#Callable > . As opposed to the L < #Parameter > that is
137
- specified in the definition of a subroutine/method/callable block.
138
-
139
- sub foo($bar) { say $bar } # $bar is a parameter
140
- foo(42); # 42 is an argument
141
-
142
122
= head1 Arity
143
123
X < |Arity >
144
124
@@ -154,19 +134,6 @@ L<callable block|#Callable>.
154
134
The arity of a C < Callable > is one of the main selectors in
155
135
L < multi-dispatch|#Multi-Dispatch > .
156
136
157
- = head1 Attribute
158
- X < |Attribute > X < |Property > X < |Member > X < |Slot >
159
-
160
- A per-object storage slot. Other programming languages refer to this as
161
- C < Field > , C < Member > , C < Slot > or C < Property > .
162
-
163
- In Perl 6, attributes are defined with the L < #has > keyword inside a
164
- L < class|#Class > :
165
-
166
- class Dog {
167
- has $.name; # public attribute "name"
168
- }
169
-
170
137
= head1 AST
171
138
X < |AST >
172
139
@@ -259,42 +226,11 @@ with the appropriate sigil:
259
226
260
227
See also L < #Adverb > .
261
228
262
- = head1 Constraint
263
- X < |Constraint >
264
-
265
- Constraints are a restriction placed on acceptable types for a parameter
266
- or subset type. They are introduced with the word C < where > . In the
267
- following example, a constraint is used to make sure an error occurs if
268
- anyone ever calls a subroutine named C < abbreviate > with a string which is
269
- shorter than 10 characters:
270
-
271
- sub abbreviate(Str $thing where { .chars >= 10 }) { ... }
272
-
273
- The C < Str > in the above example is also a constraint, but is usually
274
- referred to as a "type constraint."
275
-
276
- Note that you can also differentiate candidates in a
277
- L < multi-dispatch|#Multi-Dispatch > by using a different constraint:
278
-
279
- multi sub abbreviate(Str $thing where { .chars > 10 }) {
280
- "$thing.substr(0, 7)..."
281
- }
282
- multi sub abbreviate(Str $thing) { $thing } # no constraint
283
-
284
- say abbreviate("Worthington"); # Worthin...
285
- say abbreviate("Mäsak"); # Mäsak
286
-
287
229
= head1 Damian Conway
288
230
289
231
Original author of the L < #Exegesis > (among many other things).
290
232
See also L < https://en.wikipedia.org/wiki/Damian_Conway > .
291
233
292
- = head1 Enum
293
- X < |Enum >
294
-
295
- Enumerations provide constant key-value-pairs with an associated type.
296
- See L < Enum|/language/typesystem#enum > .
297
-
298
234
= head1 Exegesis
299
235
X < |Exegesis >
300
236
@@ -310,24 +246,12 @@ The value representing logical C<False> of the L<#Bool> L<enum|#Enum>.
310
246
= head1 fiddly
311
247
X < |fiddly >
312
248
313
- = head1 Field
314
-
315
- See L < #Attribute > .
316
-
317
249
= head1 handles
318
250
X < |handles >
319
251
320
- = head1 has
321
- X < |has >
322
-
323
- A keyword used to define L < attributes|#Attributes > .
324
-
325
252
= head1 iffy
326
253
X < |iffy >
327
254
328
- = head1 import
329
- X < |import >
330
-
331
255
= head1 Instance
332
256
X < |instance >
333
257
@@ -585,27 +509,6 @@ X<|WW>
585
509
Short for C < wrong window > . When on L < #IRC > , someone types something in a
586
510
channel that was intended for another channel, or for a private message.
587
511
588
- = head1 Invocant
589
- X < |Invocant >
590
-
591
- The object upon which a method is called, is referred to as the I < invocant >
592
- in Perl 6. It is what C < self > refers to in a method.
593
-
594
- say 'str'.uc; # 'str' is the invocant of method uc
595
-
596
- class A { method show { self } }
597
- say A.new.show; # A.new
598
-
599
- = head1 JIT
600
- X < |JIT >
601
-
602
- L < Just-in-time compilation|https://en.wikipedia.org/wiki/Just-in-time_compilation > , a technique for improving the performance of virtual machines.
603
-
604
- = head1 JVM
605
- X < |JVM >
606
-
607
- Java Virtual Machine
608
-
609
512
= head1 Larry Wall
610
513
611
514
L < Perl's|#Perl > benevolent dictator for life, among many other things. See
@@ -675,15 +578,6 @@ L<class|#Class>, L<module|#Module>, L<grammar|#Grammar>, etc. These are
675
578
typically run just after the class/module/grammar have been compiled (or
676
579
when loaded from a pre-compiled file).
677
580
678
- = head1 Member
679
-
680
- See L < #Attribute > .
681
-
682
- = head1 Method
683
- X < |Method >
684
-
685
- Methods are L < subroutine|#Subroutine > s that are called with an L < invocant|#Invocant > .
686
-
687
581
= head1 MoarVM
688
582
X < |MoarVM >
689
583
@@ -862,16 +756,6 @@ L<https://github.com/perl6/roast/>. Originally developed for L<#pugs>, it
862
756
now serves all Perl 6 implementations. Why roast? It's the B < r > epository
863
757
B < o > f B < a > ll B < s > pec B < t > ests.
864
758
865
- = head1 Role
866
- X < |Role >
867
-
868
- A role can be composed with zero or more other roles, then instantiated into
869
- a L < class|#Class > . The L < sigil|#Sigil > of a variable name indicates that the defined
870
- value in the container denoted by the variable belongs to a class composed
871
- from the associated role. For example, the sigil C < @ > denotes the
872
- C < Positional > role. So a variable C < @a > may contain a value of type C < List >
873
- because C < List.does(Positional) > .
874
-
875
759
= head1 rule
876
760
X < |rule >
877
761
@@ -897,26 +781,6 @@ starting with such a variable.
897
781
= head1 Sigilless Variable
898
782
X < |Sigilless Variable >
899
783
900
- = head1 Slot
901
-
902
- See L < #Attribute > .
903
-
904
- = head1 Slurpy
905
- X < |Slurpy >
906
-
907
- A parameter of a sub or method is said to be I < slurpy > if it can consume an
908
- arbitrary number of arguments. It is indicated by an asterisk C < * > in front
909
- of the parameter name.
910
-
911
- sub sum(*@numbers) {
912
- return [+] @numbers;
913
- }
914
-
915
- This can also be used to collect all possible named parameters in a call:
916
-
917
- sub allnameds(*%named) { .say for %named.sort }
918
- allnameds a => 42, :666b, :c<foo>; # a => 42, b => 666, c => foo
919
-
920
784
= head1 Spesh
921
785
X < |Spesh >
922
786
@@ -936,13 +800,6 @@ it's more of a guideline or model for Perl 6 implementations to follow.
936
800
= head1 Stub
937
801
X < |Stub >
938
802
939
- = head1 Subroutine
940
- X < |Subroutine >
941
-
942
- A subroutine is like a L < #block > , but its L < #runtime > context is stacked.
943
- When a subroutine is called, its context is pushed in the context stack
944
- is popped and the return argument becomes the value of the calling expression.
945
-
946
803
= head1 Symbol
947
804
X < |Symbol >
948
805
@@ -991,49 +848,11 @@ L<Exegeses|#Exegesis>.
991
848
L < #IRC > screen name for L < #Larry Wall > , creator of Perl. The name comes from
992
849
the pronunciation of L < #TIMTOWTDI > as a word.
993
850
994
- = head1 token
995
- X < |token >
996
-
997
851
= head1 True
998
852
X < |True >
999
853
1000
854
The value representing logical C < True > of the L < #Bool > L < enum|#Enum > .
1001
855
1002
- = head1 Twigil
1003
- X < |Twigil >
1004
-
1005
- A secondary L < sigil|#Sigil > . For example, %*ENV has a sigil of % and a
1006
- twigil of *.
1007
- See L < Twigils|/language/variables#Twigils > .
1008
-
1009
- = head1 Type Object
1010
- X < |Type Object >
1011
-
1012
- A I < type object > is an object representing a L < class|#Class > , L < role|#Role > ,
1013
- L < package|#Package > , L < grammar|#Grammar > or L < enum|#Enum > . It is generally
1014
- accessible with the same name as the type.
1015
-
1016
- class A { };
1017
- say A; # A is the type object
1018
- my $x = A.new(); # same here
1019
-
1020
- my $x = class {
1021
- method greet() {
1022
- say "hi";
1023
- }
1024
- }
1025
-
1026
- # $x now holds a type object returned from the
1027
- # anonymous class definition
1028
-
1029
- If a variable is declared to be of a certain type, but never defined, then
1030
- it will evaluate to the type object of that type. As such, type objects can
1031
- often turn up in places where "undefined" or "null" would in other
1032
- languages:
1033
-
1034
- # perl6 -e 'my Int $a; sub f(Int $x) { $x + 1 }; f($a);'
1035
- Invocant requires an instance, but a type object was passed
1036
-
1037
856
= head1 value
1038
857
X < |value >
1039
858
@@ -1059,21 +878,3 @@ X<|whitespace>
1059
878
1060
879
= head1 6model
1061
880
X < |6model >
1062
-
1063
- = head1 $
1064
-
1065
- L < #Sigil > for L < scalar|#Scalar > L < variables|#Variable > .
1066
-
1067
- = head1 @
1068
-
1069
- L < #Sigil > for L < array|#Array > L < variables|#Variable > .
1070
-
1071
- = head1 %
1072
-
1073
- L < #Sigil > for L < hash|#Hash > L < variables|#Variable > .
1074
-
1075
- = head1 &
1076
-
1077
- L < #Sigil > for L < code|#Code > L < variables|#Variable > .
1078
-
1079
- = end pod
0 commit comments