Skip to content

Commit c804a80

Browse files
committed
Fix type formatting for several files.
(and some very minor textual cleanups)
1 parent c442867 commit c804a80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+455
-455
lines changed

doc/Language/5to6-perlfunc.rakudoc

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ much as possible.
115115

116116
C<accept> is a method you can call on a server, e. g.
117117
C<$server.accept()>. Instead of returning a packed address, it returns a
118-
socket, most likely an IO::Socket object of some sort.
118+
socket, most likely an L<C<IO::Socket>|/type/IO:Socket> object of some sort.
119119

120120
=head2 X<alarm|Other languages,alarm - perlfunc>
121121

@@ -324,8 +324,8 @@ as much as possible.
324324

325325
=item connect SOCKET, NAME
326326

327-
Use L<connect|/routine/connect> from L<IO::Socket::Async|/type/IO::Socket::Async> for
328-
an asynchronous socket or create a L<IO::Socket::INET|/type/IO::Socket::INET> socket
327+
Use L<connect|/routine/connect> from L<C<IO::Socket::Async>|/type/IO::Socket::Async> for
328+
an asynchronous socket or create a L<C<IO::Socket::INET>|/type/IO::Socket::INET> socket
329329
for a synchronous one.
330330

331331
=head2 X<continue|Other languages,continue - perlfunc>
@@ -378,7 +378,7 @@ implementation may be premature).
378378

379379
Probably does what you expect, but technically it returns C<False> on
380380
the type object, and C<True> otherwise. This may make more sense when
381-
you realize that C<$num.raku> is the type C<Any> if you haven't assigned
381+
you realize that C<$num.raku> is the type L<C<Any>|/type/Any> if you haven't assigned
382382
anything to it, and the assigned value if you have. It can be
383383
used as a method: C<$num.defined>. And any newly created class can have
384384
its own C<.defined> method, thereby deciding how and when it should be
@@ -562,7 +562,7 @@ much as possible.
562562

563563
=item fileno FILEHANDLE
564564

565-
The C<native-descriptor> method on C<IO::Handle> returns the equivalent of
565+
The C<native-descriptor> method on L<C<IO::Handle>|/type/IO::Handle> returns the equivalent of
566566
C<fileno>.
567567

568568
The Raku ecosystem has a module L<C<P5fileno>|https://raku.land/zef:lizmat/P5fileno>
@@ -743,7 +743,7 @@ by roles like User, Group, etc.
743743
=item getsockopt SOCKET, LEVEL, OPTNAME
744744

745745
[NEEDS FURTHER RESEARCH] These are likely implemented by some kind of
746-
IO::Socket object, but details are unclear.
746+
L<C<IO::Socket>|/type/IO:Socket> object, but details are unclear.
747747

748748
=head2 X<glob|Other languages,glob - perlfunc>
749749

@@ -894,7 +894,7 @@ L<NativeCall|/language/nativecall>:
894894
sub kill(int32, int32) is native {*};
895895
kill $*PID, 9; # OUTPUT: «Killed␤»
896896

897-
To kill processes that were started by creating a L<Proc::Async|/type/Proc::Async>, use
897+
To kill processes that were started by creating a L<C<Proc::Async>|/type/Proc::Async>, use
898898
L«C<Proc::Async.kill> method|/type/Proc::Async#method_kill».
899899

900900
=head2 X<last|Other languages,last - perlfunc>
@@ -960,7 +960,7 @@ See L<link|/routine/link>
960960
=item listen SOCKET, QUEUESIZE
961961

962962
Not clearly documented, but it appears that C<listen> will be a method
963-
you would call on some variety of IO::Socket object.
963+
you would call on some variety of L<C<IO::Socket>|/type/IO:Socket> object.
964964

965965
=head2 X<local|Other languages,local - perlfunc>
966966

@@ -1005,7 +1005,7 @@ Perl behavior as much as possible.
10051005

10061006
=item lock THING
10071007

1008-
There currently is no equivalent for this In Raku. There is a C<Lock>
1008+
There currently is no equivalent for this In Raku. There is a L<C<Lock>|/type/Lock>
10091009
class for creating a Lock object, that can be locked/unlocked as needed.
10101010
But such a lock does not refer to any external objects.
10111011

@@ -1388,7 +1388,7 @@ much as possible.
13881388

13891389
=item read FILEHANDLE, SCALAR, LENGTH, OFFSET
13901390

1391-
C<read> is found in C<IO::Handle> and C<IO::Socket> in Raku. It reads
1391+
C<read> is found in L<C<IO::Handle>|/type/IO::Handle> and L<C<IO::Socket>|/type/IO:Socket> in Raku. It reads
13921392
the specified number of bytes (rather than characters) from the relevant
13931393
handle or socket. The use of an offset available in Perl is not
13941394
documented to exist at this time.
@@ -1436,7 +1436,7 @@ be lurking around in some class that isn't obvious.
14361436

14371437
=item recv SOCKET, SCALAR, LENGTH, FLAGS
14381438

1439-
Appears to be in IO::Socket. Not extensively documented at this time.
1439+
Appears to be in L<C<IO::Socket>|/type/IO:Socket>. Not extensively documented at this time.
14401440

14411441
=head2 X<redo|Other languages,redo - perlfunc>
14421442

@@ -1584,7 +1584,7 @@ the function is required.
15841584
=item seek FILEHANDLE, POSITION, WHENCE
15851585

15861586
Not documented in any real way yet, but listed as a method of the
1587-
C<IO::Handle> class.
1587+
L<C<IO::Handle>|/type/IO::Handle> class.
15881588

15891589
The Raku ecosystem has a module L<C<P5seek>|https://raku.land/zef:lizmat/P5seek>
15901590
which exports a C<seek> function that mimics the original Perl behavior
@@ -1630,7 +1630,7 @@ No longer in core.
16301630

16311631
=item send SOCKET, MSG, FLAGS, TO
16321632

1633-
Can be found in the C<IO::Socket> class.
1633+
Can be found in the L<C<IO::Socket>|/type/IO:Socket> class.
16341634

16351635
=head2 X<setpgrp|Other languages,setpgrp - perlfunc>
16361636

@@ -1704,7 +1704,7 @@ Gone from the core. May turn up in a module somewhere.
17041704

17051705
=item shutdown SOCKET, HOW
17061706

1707-
Not documented, but likely moved into C<IO::Socket>.
1707+
Not documented, but likely moved into L<C<IO::Socket>|/type/IO:Socket>.
17081708

17091709
=head2 X<sin|Other languages,sin - perlfunc>
17101710

@@ -1744,7 +1744,7 @@ as much as possible.
17441744

17451745
=item socketpair SOCKET1, SOCKET2, DOMAIN, TYPE, PROTOCOL
17461746

1747-
Not currently documented, but will likely wind up in C<IO::Socket>.
1747+
Not currently documented, but will likely wind up in L<C<IO::Socket>|/type/IO:Socket>.
17481748

17491749
=head2 X<sort|Other languages,sort - perlfunc>
17501750

@@ -1927,7 +1927,7 @@ L<functions|/language/functions>.
19271927
=item __SUB__
19281928

19291929
Replaced by C<&?ROUTINE> which is slightly different from C<__SUB__> in
1930-
that it is the actual C<Sub> (or C<Method>) object. You should call the
1930+
that it is the actual L<C<Sub>|/type/Sub> (or L<C<Method>|/type/Method>) object. You should call the
19311931
C<.name> method on it to get a string.
19321932

19331933
The Raku ecosystem has a module L<C<P5__FILE__>|https://raku.land/zef:lizmat/P5__FILE__>
@@ -2012,7 +2012,7 @@ As with C<sysopen> and friends, this has moved into the C<IO> classes.
20122012

20132013
=item tell FILEHANDLE
20142014

2015-
As a method on C<IO::Handle>.
2015+
As a method on L<C<IO::Handle>|/type/IO::Handle>.
20162016

20172017
=head2 X<telldir|Other languages,telldir - perlfunc>
20182018

@@ -2058,7 +2058,7 @@ behavior as much as possible.
20582058

20592059
=item time
20602060

2061-
Number of seconds since epoch (as an C<Int>), same as in Perl.
2061+
Number of seconds since epoch (as an L<C<Int>|/type/Int>), same as in Perl.
20622062

20632063
=head2 X<times|Other languages,times - perlfunc>
20642064

@@ -2123,7 +2123,7 @@ C<ucfirst> function that mimics the original Perl behavior as much as possible.
21232123
=item undef EXPR
21242124

21252125
There is no C<undef> in Raku. You can't undefine a function, and the closest
2126-
equivalent value is probably C<Nil>, but you'll likely have no use for that.
2126+
equivalent value is probably L<C<Nil>|/type/Nil>, but you'll likely have no use for that.
21272127

21282128
If you were using something like C<(undef, $file, $line) = caller;>, you would
21292129
just get the filename and line number directly in Raku instead of discarding
@@ -2244,8 +2244,8 @@ and shaped array (aka matrix) forms.
22442244
=item wait
22452245

22462246
[NEEDS FURTHER RESEARCH] Unclear where this has gone. There's a C<wait>
2247-
method in C<Supply>, and an C<await> method in both C<Channel> and
2248-
C<Promise>. Which, if any or all, of these is a direct equivalent of
2247+
method in L<C<Supply>|/type/Supply>, and an C<await> method in both L<C<Channel>|/type/Channel> and
2248+
L<C<Promise>|/type/Promise>. Which, if any or all, of these is a direct equivalent of
22492249
Perl's C<wait> is unclear.
22502250

22512251
=head2 X<waitpid|Other languages,waitpid - perlfunc>

doc/Language/5to6-perlop.rakudoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ probably less useful as a dereferencing operator. If you do need to
4949
dereference something, however, the arrow is the dot. It is also the dot
5050
for method calls. So, Perl's C«$arrayref->[7]» becomes
5151
C<$arrayref.[7]> in Raku and, similarly, C«$user->name» becomes
52-
C<$user.name>. The C«=>» arrow is used for constructing Pairs, see
52+
C<$user.name>. The C«=>» arrow is used for constructing L<C<Pair>|/type/Pair>s, see
5353
L<Pair term documentation|/language/terms#Pair>.
5454

5555
=head2 Auto-increment and auto-decrement
@@ -72,7 +72,7 @@ rather than "(-2)**4)") is also true for Raku.
7272
As in Perl, unary C<!> and C<-> do logical and arithmetic negation,
7373
respectively. C<?^> is used for bitwise logical negation, which the
7474
documentation indicates is equivalent to C<!>. It may be relevant to
75-
note that these coerce their arguments to C<Bool> and C<Numeric>,
75+
note that these coerce their arguments to L<C<Bool>|/type/Bool> and L<C<Numeric>|/type/Numeric>,
7676
respectively.
7777

7878
Unary C<~> is the string context operator in Raku, so use prefix C<+^>
@@ -138,7 +138,7 @@ C<==> and C<!=> both work as in Perl.
138138
C«<=>» and C<cmp> have different behavior in Raku. C«<=>»
139139
does a numeric comparison, but returns C<Order::Less>, C<Order::Same>,
140140
or C<Order::More> instead of Perl's C<-1>, C<0>, or C<1>. To get the
141-
Perl behavior (with the change that it returns the C<Order> objects,
141+
Perl behavior (with the change that it returns the L<C<Order>|/type/Order> objects,
142142
rather than integers) of C<cmp>, you would use the C<leg> operator.
143143

144144
C<cmp> does either C«<=>» or C<leg>, depending on the existing type
@@ -296,8 +296,8 @@ interpolate. E.g. C«@a = <1 2 3>; say qq/@a[] example@example.com/;»
296296
results in "1 2 3 example@example.com". Hashes interpolate in the same
297297
manner: C«%a = 1 => 2, 3 => 4;say "%a{}";» results in a space
298298
separating the pairs and tabs separating the key from the value in each
299-
pair (because that's the standard stringification of C<Pair>s, and a hash
300-
acts as list of C<Pair>s when stringified). You can also interpolate Raku
299+
pair (because that's the standard stringification of L<C<Pair>|/type/Pair>s, and a hash
300+
acts as list of L<C<Pair>|/type/Pair>s when stringified). You can also interpolate Raku
301301
code in strings using curly braces. For all the details, see
302302
L<Interpolation|/language/quoting#Interpolation%3A_qq>.
303303

doc/Language/5to6-perlvar.rakudoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ regexp match (i. e. capture variables now start from C<$0> rather than C<$1>).
6464
=head3 $REAL_GROUP_ID, $GID, $(
6565

6666
In Raku the group information is handled by C<$*GROUP>,
67-
which holds an object of type L<IntStr|/type/IntStr>
67+
which holds an object of type L<C<IntStr>|/type/IntStr>
6868
and therefore can be used either within a string
6969
or a numeric context.
7070
The group id is therefore obtained via C<+$*GROUP>, while the
@@ -77,7 +77,7 @@ The effective group id does not appear to be currently provided by Raku.
7777
=head3 $REAL_USER_ID, $UID, $<
7878

7979
In Raku the user information is handled by C<$*USER>,
80-
which holds an object of type L<IntStr|/type/IntStr>
80+
which holds an object of type L<C<IntStr>|/type/IntStr>
8181
and therefore can be used either within a string
8282
or a numeric context (this is similar to how the group
8383
information is handled by the C<$*GROUP> object).
@@ -222,7 +222,7 @@ exact running instance, for more information use C<.^methods> to introspect all
222222

223223
No equivalent variable. To have your code executed on the reception of a
224224
signal, you can call the L<signal|/routine/signal#(Supply)_sub_signal>
225-
subroutine, which returns a C<Supply> that can be tapped.
225+
subroutine, which returns a L<C<Supply>|/type/Supply> that can be tapped.
226226

227227
=for code :lang<perl>
228228
$SIG{"INT"} = sub { say "bye"; exit }
@@ -247,7 +247,7 @@ react {
247247
=head3 $BASETIME, $^T
248248

249249
Replaced in Raku by C<$*INIT-INSTANT>. Unlike in Perl, this is not in
250-
seconds since epoch, but an L<Instant|/type/Instant> object, which is measured in atomic
250+
seconds since epoch, but an L<C<Instant>|/type/Instant> object, which is measured in atomic
251251
seconds, with fractions.
252252

253253
=head3 $PERL_VERSION, $^V
@@ -261,7 +261,7 @@ There is no analog to this in Raku.
261261
=head3 $EXECUTABLE_NAME, $^X
262262

263263
This has been replaced by C<$*EXECUTABLE-NAME>.
264-
Note that there is also C<$*EXECUTABLE>, which is an C<IO> object in Raku.
264+
Note that there is also C<$*EXECUTABLE>, which is an L<C<IO>|/type/IO> object in Raku.
265265

266266
=head2 Variables related to regular expressions
267267

@@ -280,7 +280,7 @@ to C<$/[0]>, C<$1> is equivalent to C<$/[1]>, etc.
280280

281281
=head3 $MATCH, $&
282282

283-
C<$/> now contains the L<match|/type/Match> object, so the Perl behavior of C<$&> can
283+
C<$/> now contains the L<C<Match>|/type/Match> object, so the Perl behavior of C<$&> can
284284
be obtained by stringifying it, i. e. C<~$/>.
285285

286286
Please note that while C<$/.Str> should also work,
@@ -316,7 +316,7 @@ Does not exist in Raku, but you can get the same information using C<$/[*-
316316

317317
If you want to I<understand> why that works, you can look at these documents:
318318

319-
L<[ ] routine|/routine/[ ]>, L<Whatever|/type/Whatever>,
319+
L<[ ] routine|/routine/[ ]>, L<C<Whatever>|/type/Whatever>,
320320
and the L<historical design document|https://design.raku.org/S02.html#line_1126>
321321

322322
=head3 $LAST_SUBMATCH_RESULT, $^N
@@ -392,7 +392,7 @@ Currently no obvious equivalent.
392392

393393
No direct replacement exists.
394394

395-
When iterating using L<lines|/routine/lines> method from L<IO::Path|/type/IO::Path> or L<IO::Handle|/type/IO::Handle> types,
395+
When iterating using L<lines|/routine/lines> method from L<C<IO::Path>|/type/IO::Path> or L<C<IO::Handle>|/type/IO::Handle> types,
396396
you can call the C<.kv> method on it to get an interleaved list of indexes and values (then iterate by 2 each loop):
397397

398398
=begin code
@@ -406,7 +406,7 @@ for "foo".IO.lines.kv -> $n, $line {
406406
# 4: d
407407
=end code
408408

409-
For L<IO::CatHandle|/type/IO::CatHandle> types
409+
For L<C<IO::CatHandle>|/type/IO::CatHandle> types
410410
(of which L«C<$*ARGFILES>|/language/variables#index-entry-%24%2AARGFILES» is
411411
one), you can use L«C<on-switch>|/type/IO::CatHandle#method_on-switch» hook
412412
to reset line number on handle switch, and increment it manually.
@@ -428,7 +428,7 @@ C<$*OUT.nl-out>.
428428

429429
No global alternative available. TTY handles are unbuffered by default, for
430430
others, set L<out-buffer|/routine/out-buffer> to zero or use C<:!out-buffer> with L<open|/routine/open> on a
431-
specific L<IO::Handle|/type/IO::Handle>.
431+
specific L<C<IO::Handle>|/type/IO::Handle>.
432432

433433
=head3 ${^LAST_FH}
434434

@@ -446,9 +446,9 @@ here individually.
446446
To quote the Raku L<docs|/language/variables#index-entry-%24!>, "$! is the error variable." That's it.
447447
All the error variables appear to have been eaten by $!. As with the rest of
448448
Raku, it's an object that will return various things depending on the type of error
449-
or L<exception|/type/Exception>.
449+
or L<C<Exception>|/type/Exception>.
450450

451-
In particular, when dealing with L<exceptions|/type/Exception> the C<$!> provides information
451+
In particular, when dealing with L<C<Exception>|/type/Exception>s the C<$!> provides information
452452
about the thrown exception, assuming the program has not halted:
453453

454454
=begin code

0 commit comments

Comments
 (0)