Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Several small fixes.

  • Loading branch information...
commit da67c46683bcfa1c3490af345bfa5e122d8a12f0 1 parent e325b80
@nunorc nunorc authored
View
4 src/classes-and-objects.pod
@@ -137,7 +137,7 @@ into allomorphism here. Is there a rephrasing that's more correct?
However, this attribute represents an array of items, so it requires the C<@>
sigil. These items each specify a task that must be completed before the
present one can complete. Furthermore, the type declaration on this attribute
-indicates that the array may only hold instances of the Task class (or some
+indicates that the array may only hold instances of the C<Task> class (or some
subclass of it).
The third attribute represents the state of completion of a task:
@@ -249,7 +249,7 @@ C<@!dependencies> attribute of the current invocant.
After all of the dependencies have completed, it's time to perform the current
C<Task>'s task by invoking the C<&!callback> attribute directly; this is the
purpose of the parentheses. Finally, the method sets the C<$!done> attribute
-to True, so that subsequent invocations of C<perform> on this object (if this
+to C<True>, so that subsequent invocations of C<perform> on this object (if this
C<Task> is a dependency of another C<Task>, for example) will not repeat the
task.
View
8 src/multi-dispatch.pod
@@ -141,9 +141,9 @@ this to count how often a type check occurs:
multi a($x where { $counter++; True }) { };
a(3);
- say $counter;
+ say $counter; # says B<0>
a('str');
- say $counter;
+ say $counter; # says B<2>
=end programlisting
@@ -315,7 +315,7 @@ X<parameters; anonymous>
The only new thing here is that the parameters don't have names. The bodies of
the subroutines do not use them, so there's no reason to force the programmer
-to name them. A C<$> in a signature stands for a single, anonymous scalar
+to name them. A single C<$> in a signature stands for an anonymous scalar
variable.
X<types; capture>
@@ -455,7 +455,7 @@ latter by installing a I<proto> routine:
Nearly all Perl 6 built-in functions and operators export a proto definition,
which prevents accidental overriding of built-insN<One of the very rare
exceptions is the smart match operator C<< infix:<~~> >> which is not easily
-overloadable. Instead it redispatches to overloadable multi methods.>>.
+overloadable. Instead it redispatches to overloadable multi methods.>.
=begin sidebar
View
4 src/regexes.pod
@@ -663,8 +663,8 @@ X<subst>
X<substitutions>
Regexes are not only popular for data validation and extraction, but also data
-manipulation. The C<subst> method matches a regex against a string. If it
-finds a match is found, it substitutes the portion of the string that matches
+manipulation. The C<subst> method matches a regex against a string. If
+a match is found, it substitutes the portion of the string that matches
with its second argument.
=begin programlisting
View
8 src/subs-n-sigs.pod
@@ -86,7 +86,7 @@ both of these areas, allowing you to constrain the values that may be passed in
a whole range of ways and also to dig into data structures and extract the parts
that are of interest.
-=head2 The basics
+=head2 The Basics
In its most simple form, a signature is a comma separated list of variable names
that incoming arguments should be bound to.
@@ -109,7 +109,7 @@ too limiting, then you have two different ways to relax this restriction.
Marking a parameter as C<is rw> means that you are allowed to modify the
argument that was passed in. Doing so modifies the original thing that was
-passed. If a literal or some other constant value was passed in for an rw
+passed. If a literal or some other constant value was passed in for an C<rw>
parameter, then binding of the signature fails, and the subroutine cannot be
called with the constant argument.
@@ -198,7 +198,7 @@ may be bound to it, even if it could be bound to one of the other sigils too.
Sometimes you want to fill positional arguments from an array. Instead of
writing C<eat(@food[0], @food[1], @food[2], ...)> and so on for every array
item, you can I<interpolate> it into the argument list by prepending a
-vertical bar: C<eat(@food)>.
+vertical bar: C<eat(|@food)>.
Likewise hashes can be interpolated into named arguments:
@@ -358,7 +358,7 @@ to the function:
=end programlisting
-The asterisk in front of an array parameter marks it as I<slurpy>. It takes
+An asterisk C<*> preceding an array parameter marks it as I<slurpy>. It takes
all remaining positional arguments and stores them in an array.
Likewise C<*%hash> slurps all the remaining named arguments into an array.

0 comments on commit da67c46

Please sign in to comment.
Something went wrong with that request. Please try again.