Skip to content

Commit

Permalink
P6 Synopsis : ws changes - remove trailing spaces
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@27415 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
Darren_Duncan authored and Darren_Duncan committed Jul 5, 2009
1 parent 6e859b2 commit 9d5a38d
Show file tree
Hide file tree
Showing 30 changed files with 352 additions and 352 deletions.
10 changes: 5 additions & 5 deletions S02-bits.pod
Expand Up @@ -377,7 +377,7 @@ be written in any of these forms:

$x\ # comment
# inside unspace
++ # (but without the optional postfix dot)
++ # (but without the optional postfix dot)

$x\#『 comment
more comment
Expand Down Expand Up @@ -416,7 +416,7 @@ will always be interpreted as

but never as

foo.method
foo.method

Use some variant of

Expand Down Expand Up @@ -1185,7 +1185,7 @@ type on its left. Parametric types are named using square brackets, so:

actually means:

my Hash:of(Array:of(Recipe)) %book;
my Hash:of(Array:of(Recipe)) %book;

Because the actual variable can be hard to find when complex types are
specified, there is a postfix form as well:
Expand Down Expand Up @@ -1601,7 +1601,7 @@ hash, all named arguments.

All prefix sigil operators accept one positional argument, evaluated in
item context as a rvalue. They can interpolate in strings if called with
parentheses. The special syntax form C<$()> translates into C<$( $.ast // Str($/) )>
parentheses. The special syntax form C<$()> translates into C<$( $.ast // Str($/) )>
to operate on the current match object; similarly C<@()> and C<%()> can
extract positional and named submatches.

Expand Down Expand Up @@ -1761,7 +1761,7 @@ elements, then the second elements, etc. For more on C<sort> see S29.
Many of the special variables of Perl 5 are going away. Those that
apply to some object such as a filehandle will instead be attributes
of the appropriate object. Those that are truly global will have
global alphabetic names, such as C<$*PID> or C<@*ARGS>.
global alphabetic names, such as C<$*PID> or C<@*ARGS>.

=item *
Expand Down
2 changes: 1 addition & 1 deletion S03-operators.pod
Expand Up @@ -481,7 +481,7 @@ For digits we have ranges like:
0..9 # ASCII
٠..٩ # Arabic-Indic
०..९ # Devangari
০..৯ # Bengali
০..৯ # Bengali
੦..੯ # Gurmukhi
૦..૯ # Gujarati
୦..୯ # Oriya
Expand Down
8 changes: 4 additions & 4 deletions S04-control.pod
Expand Up @@ -150,7 +150,7 @@ this still works:

my $x = [
sub { 3 }, # this comma is not optional
sub { 3 } # the statement won't terminate here
sub { 3 } # the statement won't terminate here
];

However, a hash composer may never occur at the end of a line. If the
Expand Down Expand Up @@ -521,7 +521,7 @@ the bare block is not a do-once. Instead C<do {...}> is the do-once
loop (which is another reason you can't put a statement
modifier on it; use C<repeat> for a test-at-the-end loop).

For any statement, prefixing with a C<do> allows you to
For any statement, prefixing with a C<do> allows you to
return the value of that statement and use it in an expression:

$x = do if $a { $b } else { $c };
Expand Down Expand Up @@ -573,7 +573,7 @@ block C<CONTEXT::> refers to the scope surrounding the block. But unlike
an explicit call, C<CALLER::> doesn't count it as a routine boundary.

If you wish to return a closure from a function, you must use an
explicit prefix such as C<return> or C<sub> or C<< -> >>.
explicit prefix such as C<return> or C<sub> or C<< -> >>.

sub f1
{
Expand Down Expand Up @@ -1116,7 +1116,7 @@ exceptions and exit values:
START {...}* on first ever execution, once per closure clone

ENTER {...}* at every block entry time, repeats on loop blocks.
LEAVE {...} at every block exit time
LEAVE {...} at every block exit time
KEEP {...} at every successful block exit, part of LEAVE queue
UNDO {...} at every unsuccessful block exit, part of LEAVE queue

Expand Down
8 changes: 4 additions & 4 deletions S05-regex.pod
Expand Up @@ -25,7 +25,7 @@ long time, and we think the popular term "regex" is in the process of
becoming a technical term with a precise meaning of: "something you do
pattern matching with, kinda like a regular expression". On the other
hand, one of the purposes of the redesign is to make portions of
our patterns more amenable to analysis under traditional regular
our patterns more amenable to analysis under traditional regular
expression and parser semantics, and that involves making careful
distinctions between which parts of our patterns and grammars are
to be treated as declarative, and which parts as procedural.
Expand Down Expand Up @@ -1108,12 +1108,12 @@ ordinary "quote words" array literal.

< adam & eve > # equivalent to [ 'adam' | '&' | 'eve' ]

Note that the space before the ending > is optional and therefore
Note that the space before the ending > is optional and therefore
< adam & eve> would be acceptable.

=item *

A leading alphabetic character means it's a capturing grammatical
A leading alphabetic character means it's a capturing grammatical
assertion (i.e. a subrule or a named character class - see below):

/ <sign>? <mantissa> <exponent>? /
Expand Down Expand Up @@ -3263,7 +3263,7 @@ For example:
Note, however, that a set of quantified I<non-capturing> brackets always
returns a single C<Match> object which contains only the complete
substring that was matched by the full set of repetitions of the
brackets (as described in L<Named scalar aliases applied to
brackets (as described in L<Named scalar aliases applied to
non-capturing brackets>). For example:

"coffee fifo fumble" ~~ m/ $<effs>=[f <-[f]> ** 1..2 \s*]+ /;
Expand Down
28 changes: 14 additions & 14 deletions S06-routines.pod
Expand Up @@ -124,7 +124,7 @@ You can declare a sub without parameter list, as in Perl 5:

sub foo {...}

This is equivalent to
This is equivalent to

sub foo (*@_, *%_) {...}

Expand Down Expand Up @@ -827,7 +827,7 @@ into an array when individual elements are actually accessed:
@fromtwo = tail(1..Inf); # @fromtwo contains a lazy [2..Inf]

You can't bind to the name of a slurpy parameter: the name is just there
so you can refer to it within the body.
so you can refer to it within the body.

sub foo(*%flag, *@data) {...}

Expand Down Expand Up @@ -1322,7 +1322,7 @@ class unless you want it. The sub above could be written as

sub matchedset (Dog ::T, T) {...}

if we're not interested in C<$fido> or C<$spot>. Or just
if we're not interested in C<$fido> or C<$spot>. Or just

sub matchedset (::T, T) {...}

Expand Down Expand Up @@ -1538,7 +1538,7 @@ it would wrongly attach to the inner block.

=head1 Properties and traits

Compile-time properties are called "traits". The
Compile-time properties are called "traits". The
C<is I<NAME> (I<DATA>)> syntax defines traits on containers and
subroutines, as part of their declaration:

Expand Down Expand Up @@ -1576,7 +1576,7 @@ on the degree of ambiguity desired:
is :Foo[...] # definitely a pair with a list
is Foo[...] # depends on whether Foo is predeclared as type

=over
=over

=item C<is signature>

Expand Down Expand Up @@ -1708,7 +1708,7 @@ C<equiv> may be useful for cloning other traits of these operators.)
postfix:<++>
postfix_prefix_meta_operator:{'»'}
prefix:<++>
prefix_circumfix_meta_operator:{'[',']'}
prefix_circumfix_meta_operator:{'[',']'}
prefix_postfix_meta_operator:{'«'}
q_backslash:<\\>
qq_backslash:<n>
Expand Down Expand Up @@ -1857,7 +1857,7 @@ for their side effects, since most return values will be ignored.

The following traits can be applied to many types of parameters.

=over
=over

=item C<is readonly>

Expand Down Expand Up @@ -1954,7 +1954,7 @@ that expression is also taken to be a C<Capture>, just as if the expression
were the argument to a C<return> list operator (with whitespace):

sub f { :x<1> } # named-argument binding (if caller uses |)
sub f { (:x<1>) } # always just one positional Pair object
sub f { (:x<1>) } # always just one positional Pair object

On the caller's end, the C<Capture> is interpolated into any new argument list
much like an array would be, that is, as an item in item context, and as a
Expand Down Expand Up @@ -2244,7 +2244,7 @@ C<temp> was applied, the subroutine returned by the C<.TEMP> method is
executed.

The default C<.TEMP> method for variables simply creates
a closure that assigns the variable's pre-C<temp> value
a closure that assigns the variable's pre-C<temp> value
back to the variable.

New kinds of temporization can be created by writing storage classes with
Expand All @@ -2254,7 +2254,7 @@ their own C<.TEMP> methods:
method TEMP {
print "Replacing $.WHICH() at {caller.location}\n";
my $restorer = $.SUPER::TEMP();
return {
return {
print "Restoring $.WHICH() at {caller.location}\n";
$restorer();
};
Expand Down Expand Up @@ -2327,7 +2327,7 @@ as it does with the equivalent assignment shown since assignment
to a C<Routine> works like a container, changing the contained C<do>
property but not the container itself.

The call to C<.wrap> returns a unique handle that has a C<restore> method
The call to C<.wrap> returns a unique handle that has a C<restore> method
that will undo the wrapping:

$handle.restore;
Expand Down Expand Up @@ -2608,7 +2608,7 @@ the text determines subsequent expectations.)

Quasiquotes default to hygienic lexical scoping, just like closures.
The visibility of lexical variables is limited to the quasi expression
by default. A variable declaration can be made externally visible using
by default. A variable declaration can be made externally visible using
the C<COMPILING::> pseudo-package. Individual variables can be made visible,
or all top-level variable declarations can be exposed using the
C<quasi :COMPILING> form.
Expand All @@ -2619,7 +2619,7 @@ the macro call:
quasi { my $COMPILING::new_variable; my $private_var; ... }
quasi :COMPILING { my $new_variable; { my $private_var; ... } }

(Note that C<:COMPILING> has additional effects described in L</Macros>.)
(Note that C<:COMPILING> has additional effects described in L</Macros>.)

=head1 Other matters

Expand All @@ -2628,7 +2628,7 @@ the macro call:

C<{...}> is always a block. However, if it is completely empty or
consists of a single list, the first element of which is either a hash
or a pair, it is executed immediately to compose a C<Hash> object.
or a pair, it is executed immediately to compose a C<Hash> object.

The standard C<pair> list operator is equivalent to:

Expand Down

0 comments on commit 9d5a38d

Please sign in to comment.