Skip to content

Commit

Permalink
Rewrite broken /type links as /routine.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfa committed Jan 12, 2019
1 parent 92da032 commit fe72b23
Show file tree
Hide file tree
Showing 46 changed files with 121 additions and 121 deletions.
10 changes: 5 additions & 5 deletions doc/Language/5to6-perlfunc.pod6
Expand Up @@ -181,7 +181,7 @@ L<here|/language/control#proceed>.
=item caller EXPR
There are a couple different ways to get at caller information in Perl 6.
The basic functionality is provided through L<callframe|/type/callframe> now. However, Perl 6
The basic functionality is provided through L<callframe|/routine/callframe> now. However, Perl 6
constructs call frames for regular blocks, not just for subroutines, so there
are more frames to look through. The following will retrieve the basic
information that C<caller> can return:
Expand Down Expand Up @@ -218,7 +218,7 @@ as much as possible.
Works as it does in Perl 5 but B<must> take an argument. The behaviour
of C<chdir()> (with regards to looking at HOME and LOGDIR) is not supported.
In Perl 6, L<chdir|/type/chdir> only changes the C<$*CWD> dynamic variable. It does
In Perl 6, L<chdir|/routine/chdir> only changes the C<$*CWD> dynamic variable. It does
B<not> actually change the default directory from the OS's point of view; the
special dynamic-variable routine L«C<&*chdir>|/routine/&*chdir» can be used
for that, if needed.
Expand Down Expand Up @@ -747,7 +747,7 @@ IO::Socket object, but details are unclear.
=item glob EXPR
Not available in core, although some of the functionality is offered by
L<dir|/type/dir> routine and its C<test> argument.
L<dir|/routine/dir> routine and its C<test> argument.
See L«C<IO::Glob> module in ecosystem|https://modules.perl6.org/dist/IO::Glob»
Expand Down Expand Up @@ -949,7 +949,7 @@ much as possible.
=item link OLDFILE, NEWFILE
See L<link|/type/link>
See L<link|/routine/link>
=head2 listen
Expand Down Expand Up @@ -1146,7 +1146,7 @@ only, read-write, and append, you would use C<:w>, C<:rw>, and C<:a>
respectively. There are also options for encoding and how the filehandle
deals with newlines. Details L<here|/routine/open>.
Another important change is that filehandles don't get automatically closed on scope exit. It's necessary to call L<close|/type/close> explicitly.
Another important change is that filehandles don't get automatically closed on scope exit. It's necessary to call L<close|/routine/close> explicitly.
=head2 opendir
Expand Down
10 changes: 5 additions & 5 deletions doc/Language/faq.pod6
Expand Up @@ -277,14 +277,14 @@ X<|Data::Dumper (FAQ)>
=head2 How can I dump Perl 6 data structures
(like Perl 5 Data::Dumper and similar)?
Typical options are to use L<say|/type/say> routine that uses L<gist|/type/gist> method that
Typical options are to use L<say|/routine/say> routine that uses L<gist|/routine/gist> method that
gives the "gist" of the object being dumped. More detailed output can be
obtained by calling L<perl|/type/perl> method that typically returns representation
obtained by calling L<perl|/routine/perl> method that typically returns representation
in L<EVAL|/routine/EVAL>-able code.
If you're using the L<rakudo|https://rakudo.org> implementation, you can use
the L«rakudo-specific C<dd> routine|/programs/01-debugging#Dumper_function_dd»
for dumping, whose output is similar to L<perl|/type/perl>, but with more information.
for dumping, whose output is similar to L<perl|/routine/perl>, but with more information.
Examples:
Expand Down Expand Up @@ -348,10 +348,10 @@ say $bar; # OUTPUT: «70␤»
=end code
To test whether a variable has any defined values, see
L<DEFINITE|/language/classtut#index-entry-.DEFINITE> and L<defined|/type/defined>
L<DEFINITE|/language/classtut#index-entry-.DEFINITE> and L<defined|/routine/defined>
routines. Several other constructs exist that test for definiteness, such as
L«C<with>, C<orwith>, and C<without>|/syntax/with%20orwith%20without»
statements, L«C<//>|/routine/$SOLIDUS$SOLIDUS», L<andthen|/type/andthen>, L<notandthen|/routine/notandthen>, and
statements, L«C<//>|/routine/$SOLIDUS$SOLIDUS», L<andthen|/routine/andthen>, L<notandthen|/routine/notandthen>, and
L<orelse|/routine/orelse> operators, as well as L<type constraint smileys|/type/Signature#Constraining_defined_and_undefined_values>.
=head2 What is C<so>?
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/grammars.pod6
Expand Up @@ -518,7 +518,7 @@ Here is a contrived example of a grammar and actions in action:
=end code
An instance of C<TestActions> is passed as named argument C<actions> to the
L<parse|/type/parse> call, and when token C<TOP> has matched successfully,
L<parse|/routine/parse> call, and when token C<TOP> has matched successfully,
it automatically calls method C<TOP>, passing the match object as an argument.
To make it clear that the argument is a match object, the example uses C<$/>
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/hashmap.pod6
Expand Up @@ -309,7 +309,7 @@ is never L<===> to another.
say $first-instant === %intervals.keys.sort[0]; # OUTPUT: «True␤»
Since C<Instant> defines its own comparison methods, in our example a sort
according to L<cmp|/type/cmp> will always provide the earliest instant object as the first
according to L<cmp|/routine/cmp> will always provide the earliest instant object as the first
element in the L<List|/type/List> it returns.
If you would like to accept any object whatsoever in your hash, you can use L<Any|/type/Any>!
Expand Down
6 changes: 3 additions & 3 deletions doc/Language/nativecall.pod6
Expand Up @@ -126,8 +126,8 @@ say "$result, $this-time"; # OUTPUT: «0, timespec<65385480>␤»
=end code
The L<original function we are calling,
L<clock_gettime|/type/clock_gettime>|https://linux.die.net/man/3/clock_gettime>, uses a pointer to
the C<timespec> struct as second argument. We declare it as a L<class|/type/class> here, but
L<clock_gettime|/routine/clock_gettime>|https://linux.die.net/man/3/clock_gettime>, uses a pointer to
the C<timespec> struct as second argument. We declare it as a L<class|/syntax/class> here, but
specify its representation as C<is repr('CStruct')>, to indicate it corresponds
to a C data structure. When we create an object of that class, we are creating
exactly the kind of pointer C<clock_gettime> expects. This way, data can be
Expand Down Expand Up @@ -1141,4 +1141,4 @@ AF_INET6 SOCK_RAW
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
2 changes: 1 addition & 1 deletion doc/Language/nativetypes.pod6
Expand Up @@ -143,7 +143,7 @@ my Pointer[void] $for-malloc = malloc( 32 );
say $for-malloc.perl;
=end code
You can also L<nativecast|/type/nativecast> L<Blob|/type/Blob>s to this kind of pointer in case you need to
You can also L<nativecast|/routine/nativecast> L<Blob|/type/Blob>s to this kind of pointer in case you need to
work with them in native functions that use the type
=begin code
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/numerics.pod6
Expand Up @@ -81,10 +81,10 @@ L<Num|/type/Num> literal and does offer support for negative zero and
L<denormals|https://en.wikipedia.org/wiki/Denormal_number> (also known as
"subnormals").
Keep in mind that output routines like L<say|/type/say> or L<put|/routine/put> do not try very hard to
Keep in mind that output routines like L<say|/routine/say> or L<put|/routine/put> do not try very hard to
distinguish between how L<Numeric|/type/Numeric> types are output and may choose to display
a L<Num|/type/Num> as an L<Int|/type/Int> or a L<Rat|/type/Rat> number. For a more definitive string to
output, use the L<perl|/type/perl> method:
output, use the L<perl|/routine/perl> method:
=begin code
say 1e0; # OUTPUT: «1␤»
Expand Down Expand Up @@ -242,10 +242,10 @@ say (1🙼3).perl; # OUTPUT: «FatRat.new(1, 3)␤»
=head2 Printing rationals
Keep in mind that output routines like L<say|/type/say> or L<put|/routine/put> do not try very hard to
Keep in mind that output routines like L<say|/routine/say> or L<put|/routine/put> do not try very hard to
distinguish between how L<Numeric|/type/Numeric> types are output and may choose to display
a L<Num|/type/Num> as an L<Int|/type/Int> or a L<Rat|/type/Rat> number. For a more definitive string to
output, use the L<perl|/type/perl> method:
output, use the L<perl|/routine/perl> method:
=begin code
say 1.0; # OUTPUT: «1␤»
Expand Down
6 changes: 3 additions & 3 deletions doc/Language/objects.pod6
Expand Up @@ -551,7 +551,7 @@ X<|new (method)>
Objects are generally created through method calls, either on the type
object or on another object of the same type.
Class L<Mu|/type/Mu> provides a constructor method called L<new|/type/new>, which takes named
Class L<Mu|/type/Mu> provides a constructor method called L<new|/routine/new>, which takes named
L<arguments|/language/functions#Arguments> and uses them to initialize public
attributes.
Expand Down Expand Up @@ -668,7 +668,7 @@ say RectangleWithCachedArea.new( x2 => 5, x1 => 1, y2 => 1, y1 => 0).area;
=head2 Object cloning
The cloning is done using the L<clone|/type/clone> method available on all objects, which
The cloning is done using the L<clone|/routine/clone> method available on all objects, which
shallow-clones both public and private attributes. New values for I<public>
attributes can be supplied as named arguments.
Expand All @@ -684,7 +684,7 @@ attributes can be supplied as named arguments.
say $o2; # Foo.new(foo => 42, bar => 5000)
=end code
See document for L<clone|/type/clone> for details on how non-scalar attributes get cloned,
See document for L<clone|/routine/clone> for details on how non-scalar attributes get cloned,
as well as examples of implementing your own custom clone methods.
=head1 X<Roles|declarator,role>
Expand Down
38 changes: 19 additions & 19 deletions doc/Language/operators.pod6
Expand Up @@ -385,7 +385,7 @@ X<|[] (reduction metaoperators)>X<|[+] (reduction metaoperators)>
=head1 Reduction metaoperators
The reduction metaoperator, C<[ ]>, reduces a list with the given infix
operator. It gives the same result as the L<reduce|/type/reduce> routine - see there for
operator. It gives the same result as the L<reduce|/routine/reduce> routine - see there for
details.
# These two are equivalent:
Expand Down Expand Up @@ -499,7 +499,7 @@ Otherwise it constructs a L<Block|/type/Block>.
To force construction of a L<Block|/type/Block>, follow the opening brace with a semicolon.
To always ensure you end up with a L<Hash|/type/Hash>, you can use C<%( )> coercer or
L<hash|/type/hash> routine instead:
L<hash|/routine/hash> routine instead:
{}.^name.say; # OUTPUT: «Hash␤»
{;}.^name.say; # OUTPUT: «Block␤»
Expand Down Expand Up @@ -726,7 +726,7 @@ X<Hyper method call operator>. Will call a method on all elements of a C<List> o
say @a».&foo; # So we can pretend to have a method call with a sub that got a good first positional argument.
say @a».&{ .ord}; # Blocks have an implicit positional arguments that lands in $_. The latter can be omitted for method calls.
Hyper method calls may appear to be the same as doing a L<map|/type/map> call, however
Hyper method calls may appear to be the same as doing a L<map|/routine/map> call, however
along with being a hint to the compiler that it can parallelize the call, the
behaviour is also affected by
L<nodality of the method|/routine/is%20nodal>
Expand All @@ -738,7 +738,7 @@ method. If the hyper is applied to a method, that L<Callable|/type/Callable> is
name, looked up on L<List|/type/List> type; if the hyper is applied to a routine (e.g.
C<».&foo>), that routine functions as that L<Callable|/type/Callable>. If the L<Callable|/type/Callable> is
determined to provide C<nodal> method, L<nodemap|/routine/nodemap> semantics are used to perform
the hyper call, otherwise L<duckmap|/type/duckmap> semantics are used.
the hyper call, otherwise L<duckmap|/routine/duckmap> semantics are used.
Take care to avoid a
L<common mistake|/language/traps#Using_»_and_map_interchangeably> of expecting
Expand Down Expand Up @@ -828,7 +828,7 @@ Increments its argument by one and returns the updated value.X<|prefix increment
say ++$x; # OUTPUT: «4␤»
say $x; # OUTPUT: «4␤»
It works by calling the L<succ|/type/succ> method (for I<successor>) on its argument,
It works by calling the L<succ|/routine/succ> method (for I<successor>) on its argument,
which gives custom types the freedom to implement their own increment
semantics.
Expand All @@ -843,7 +843,7 @@ Decrements its argument by one and returns the updated value.
say --$x; # OUTPUT: «2␤»
say $x; # OUTPUT: «2␤»
It works by calling the L<pred|/type/pred> method (for I<predecessor>) on its argument,
It works by calling the L<pred|/routine/pred> method (for I<predecessor>) on its argument,
which gives custom types the freedom to implement their own decrement
semantics.
Expand All @@ -858,7 +858,7 @@ Increments its argument by one and returns the original value.X<|postfix increme
say $x++; # OUTPUT: «3␤»
say $x; # OUTPUT: «4␤»
It works by calling the L<succ|/type/succ> method (for I<successor>) on its argument,
It works by calling the L<succ|/routine/succ> method (for I<successor>) on its argument,
which gives custom types the freedom to implement their own increment
semantics.
Expand Down Expand Up @@ -886,7 +886,7 @@ Decrements its argument by one and returns the original value.
say $x--; # OUTPUT: «3␤»
say $x; # OUTPUT: «2␤»
It works by calling the L<pred|/type/pred> method (for I<predecessor>) on its argument,
It works by calling the L<pred|/routine/pred> method (for I<predecessor>) on its argument,
which gives custom types the freedom to implement their own decrement
semantics.
Expand Down Expand Up @@ -1459,7 +1459,7 @@ keep that.
Mixes C<$role> into C<$obj> at runtime. Requires C<$obj> to be mutable.
Similar to L<but|/type/but> operator, the C<$role> can instead be an instantiated object,
Similar to L<but|/routine/but> operator, the C<$role> can instead be an instantiated object,
in which case, the operator will create a role for you automatically.
The role will contain a single method named the same as C<$obj.^name>
and that returns C<$obj>:
Expand Down Expand Up @@ -2033,22 +2033,22 @@ operand. Short-circuits.
=head2 infix C«min»
Returns the smallest of the arguments, as determined by L<cmp|/type/cmp> semantics.
Returns the smallest of the arguments, as determined by L<cmp|/routine/cmp> semantics.
my $foo = 42;
$foo min= 0 # read as: $foo decreases to 0
=head2 infix C«max»
Returns the largest of the arguments, as determined by L<cmp|/type/cmp> semantics.
Returns the largest of the arguments, as determined by L<cmp|/routine/cmp> semantics.
my $foo = -42;
$foo max= 0 # read as: $foo increases to 0
=head2 infix C«minmax»
Returns the L<Range|/type/Range> starting from the lowest to the highest of the values,
as determined by the L<cmp|/type/cmp> semantics.
as determined by the L<cmp|/routine/cmp> semantics.
For instance:
=begin code
Expand All @@ -2075,7 +2075,7 @@ among all available values:
('a','b','z') minmax ('c','d','w'); # "a".."z"
=end code
Similarly, when applied to L<Hash|/type/Hash>es, it performs a L<cmp|/type/cmp> way comparison:
Similarly, when applied to L<Hash|/type/Hash>es, it performs a L<cmp|/routine/cmp> way comparison:
=begin code
my %winner = points => 30, misses => 10;
Expand Down Expand Up @@ -2425,7 +2425,7 @@ L<Junctions|/type/Junctions>.
The sequence operator invokes the generator with as many arguments as
necessary. The arguments are taken from the initial elements and the
already generated elements. The default generator is
C<*.>L<succ|/type/succ> or C<*.>L<pred|/type/pred>, depending on how the
C<*.>L<succ|/routine/succ> or C<*.>L<pred|/routine/pred>, depending on how the
end points compare:
say 1 ... 4; # OUTPUT: «(1 2 3 4)␤»
Expand Down Expand Up @@ -2595,7 +2595,7 @@ first L<undefined|/routine/defined> argument, otherwise the last
argument. Last argument is returned as-is, without being checked for
definedness at all. Short-circuits. The result of the left side is bound
to C<$_> for the right side, or passed as arguments if the right side is
a L«C<Callable>|/type/Callable», whose L<count|/type/count> must be C<0>
a L«C<Callable>|/type/Callable», whose L<count|/routine/count> must be C<0>
or C<1>.
A handy use of this operator is to alias a routine's return value to C<$_> and
Expand Down Expand Up @@ -2635,12 +2635,12 @@ the first L<defined|/routine/defined> argument, otherwise the last argument.
Last argument is returned as-is, without being checked for definedness at all.
Short-circuits. The result of the left side is bound to C<$_> for the
right side, or passed as arguments if the right side is a
L«C<Callable>|/type/Callable», whose L<count|/type/count> must be C<0> or C<1>.
L«C<Callable>|/type/Callable», whose L<count|/routine/count> must be C<0> or C<1>.
At first glance, L<notandthen|/routine/notandthen> might appear to be the same thing as the L<orelse|/routine/orelse>
operator. The difference is subtle: L<notandthen|/routine/notandthen> returns
L«C<Empty>|/type/Slip#index-entry-Empty-Empty» when it encounters a
L<defined|/type/defined> item (that isn't the last item), whereas L<orelse|/routine/orelse> returns that
L<defined|/routine/defined> item (that isn't the last item), whereas L<orelse|/routine/orelse> returns that
item. In other words, L<notandthen|/routine/notandthen> is a means to act when items aren't
defined, whereas L<orelse|/routine/orelse> is a means to obtain the first defined item:
Expand Down Expand Up @@ -2689,10 +2689,10 @@ Returns the first defined argument, or else the last argument. Last argument
is returned as-is, without being checked for definedness at all.
Short-circuits. The result of the left side is bound to
C<$_> for the right side, or passed as an argument if the right side is a
L«C<Callable>|/type/Callable», whose L<count|/type/count> must be C<0> or C<1>.
L«C<Callable>|/type/Callable», whose L<count|/routine/count> must be C<0> or C<1>.
This operator is useful for handling L<Failures|/type/Failure> returned by
routines since the expected value is usually L<defined|/type/defined>
routines since the expected value is usually L<defined|/routine/defined>
and L<Failure|/type/Failure> never is:
sub meows { ++$ < 4 ?? fail 'out of meows!' !! '🐱' }
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/phasers.pod6
Expand Up @@ -208,8 +208,8 @@ The return value is available for use in later phases:
# 6-3
The C<^10 .pick> in the phaser is generated only once and is then re-used by the loop
during runtime. Note how the L<say|/type/say> in the C<BEGIN> block is executed before
the L<say|/type/say> that is above the loop.
during runtime. Note how the L<say|/routine/say> in the C<BEGIN> block is executed before
the L<say|/routine/say> that is above the loop.
=head2 X<CHECK|Phasers, CHECK>
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/py-nutshell.pod6
Expand Up @@ -31,8 +31,8 @@ Perl 6
put "Hello, world!"
There is also the L<say|/type/say> keyword, which behaves similarly, but will call
the L<gist|/type/gist> method of its argument.
There is also the L<say|/routine/say> keyword, which behaves similarly, but will call
the L<gist|/routine/gist> method of its argument.
Perl 6
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/quoting.pod6
Expand Up @@ -134,7 +134,7 @@ in your strings, to avoid interpretation of angle brackets as hash keys:
=begin code :allow<B L> :skip-test
my $color = 'blue';
L<say|/type/say> B<">My favorite color is B<$color>!B<">
L<say|/routine/say> B<">My favorite color is B<$color>!B<">
My favorite color is blue!
=end code
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/structures.pod6
Expand Up @@ -110,14 +110,14 @@ will obtain a different value every time you run it;
L<C<kv>|/type/Pair#method_kv> turns every C<Pair> into a list.
Complex data structures are also generally L<Iterable|/type/Iterable>. Generating an
L<iterator|/type/iterator> out of them will allow the program to visit the first level of the
L<iterator|/routine/iterator> out of them will allow the program to visit the first level of the
structure, one by one:
.say for 'א'..'ס'; # OUTPUT: «א␤ב␤ג␤ד␤ה␤ו␤ז␤ח␤ט␤י␤ך␤כ␤ל␤ם␤מ␤ן␤נ␤ס␤»
C<'א'..'ס'> is a L<Range|/type/Range>, a complex data structure, and with C<for> in front it
will iterate until the list is exhausted. You can use C<for> on your complex
data structures by overriding the L<iterator|/type/iterator> method (from role C<Iterable>):
data structures by overriding the L<iterator|/routine/iterator> method (from role C<Iterable>):
class SortedArray is Array {
method iterator() {
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/subscripts.pod6
Expand Up @@ -321,7 +321,7 @@ object) or an empty list (which returns an empty slice):
say %bag{()}; # OUTPUT: «()␤»
Zen slicing does not
L<reify|/language/glossary#index-entry-Reify> or L<cache|/type/cache> and merely
L<reify|/language/glossary#index-entry-Reify> or L<cache|/routine/cache> and merely
returns the invocant. It is usually used to
L<interpolate|/language/quoting#Interpolation:_qq> entire arrays / hashes into
strings or to L<decont|/language/glossary#index-entry-decont>.
Expand Down

0 comments on commit fe72b23

Please sign in to comment.