Author: autrijus
Date: Sun Feb 26 07:45:08 2006
New Revision: 7876
Modified:
doc/trunk/design/syn/S03.pod
doc/trunk/design/syn/S04.pod
doc/trunk/design/syn/S05.pod
doc/trunk/design/syn/S06.pod
doc/trunk/design/syn/S09.pod
doc/trunk/design/syn/S12.pod
Log:
* podchecking all the S*.
Modified: doc/trunk/design/syn/S03.pod
==============================================================================
--- doc/trunk/design/syn/S03.pod (original)
+++ doc/trunk/design/syn/S03.pod Sun Feb 26 07:45:08 2006
@@ -172,9 +172,9 @@
When using a unary operator, only put it on the operand's side:
@negatives = -« @positives;
-
+
@positions »++; # Increment all positions
-
+
@objects ».run();
("f","oo","bar")».chars; # (1,2,3)
@@ -263,7 +263,7 @@
allowing multiple operands.
if 3 < $roll <= 6 { print "High roll" }
-
+
if 1 <= $roll1 == $roll2 <= 6 { print "Doubles!" }
Note: any operator beginning with C<< < >> must have whitespace
Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod (original)
+++ doc/trunk/design/syn/S04.pod Sun Feb 26 07:45:08 2006
@@ -678,7 +678,7 @@
print if $foo
-since C<< prefix:<if>> > would hide C<< statement_modifier:<if> >>.
+since C<< prefix:<if> >> would hide C<< statement_modifier:<if> >>.
=head1 Smart matching
Modified: doc/trunk/design/syn/S05.pod
==============================================================================
--- doc/trunk/design/syn/S05.pod (original)
+++ doc/trunk/design/syn/S05.pod Sun Feb 26 07:45:08 2006
@@ -1123,7 +1123,7 @@
may be of any type, not just a string.
You may also capture a subset of the match as the result object using
-the C<< <(...)> construct:
+the C<< <(...)> >> construct:
"foo123bar" ~~ / foo <( \d+ )> bar /
say $(); # says 123
Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod (original)
+++ doc/trunk/design/syn/S06.pod Sun Feb 26 07:45:08 2006
@@ -191,7 +191,7 @@
my $lastval;
sub lastval () is rw { return $lastval }
-
+
or the result of some nested call to an lvalue subroutine:
sub prevval () is rw { return lastval() }
@@ -634,7 +634,7 @@
so you can refer to it within the body.
sub foo(*%flag, [EMAIL PROTECTED]) {...}
-
+
foo(:flag{ a => 1 }, :data[ 1, 2, 3 ]);
# %flag has elements (flag => (a => 1)) and (data => [1,2,3])
# @data has nothing
@@ -1027,9 +1027,9 @@
my $addr := delete %guest_data<addr>;
...
}
-
+
you can get the same effect with:
-
+
sub register ({:$name, :$addr, *%guest_data}, $room_num) {
...
}
Modified: doc/trunk/design/syn/S09.pod
==============================================================================
--- doc/trunk/design/syn/S09.pod (original)
+++ doc/trunk/design/syn/S09.pod Sun Feb 26 07:45:08 2006
@@ -503,30 +503,30 @@
single junction of the same species as the junctive argument.
If two or more arguments are junctive, then the argument that is
chosen to be "autothreaded" is:
-
+
=over
-
+
=item *
-
+
the left-most conjunction or injunction (if any), or else
-
+
=item *
-
+
the left-most abjunction or disjunction
-
+
=back
-
+
with the tests applied in that order.
-
+
Each of the resulting set of calls is then recursively autothreaded
until no more junctive arguments remain. That is:
-
+
substr("camel", 0|1, 2&3)
-
+
-> all( substr("camel", 0|1, 2), # autothread the conjunctive arg
substr("camel", 0|1, 3)
)
-
+
-> all( any( substr("camel", 0, 2), # autothread the disjunctive arg
substr("camel", 1, 2),
),
@@ -534,14 +534,14 @@
substr("camel", 1, 3),
)
)
-
+
-> all( any( "ca", # evaluate
"am",
),
any( "cam",
"ame",
)
-
+
-> ("ca"|"am") & ("cam"|"ame") # recombine results in junctions
Junctions passed as part of a container do not cause autothreading
Modified: doc/trunk/design/syn/S12.pod
==============================================================================
--- doc/trunk/design/syn/S12.pod (original)
+++ doc/trunk/design/syn/S12.pod Sun Feb 26 07:45:08 2006
@@ -1175,11 +1175,11 @@
subset Str_not2b of Str where /^[isnt|arent|amnot|aint]$/;
subset EvenNum of Num where { $^n % 2 == 0 }
-
+
my Str_not2b $hamlet;
$hamlet = 'isnt'; # Okay because 'isnt' ~~ /^[isnt|arent|amnot|aint]$/
$hamlet = 'amnt'; # Bzzzzzzzt! 'amnt' !~ /^[isnt|arent|amnot|aint]$/
-
+
my EvenNum $n;
$n = 2; # Okay
$n = -2; # Okay
@@ -1213,7 +1213,7 @@
$mesg ~~ s:g/<profanity>/[expletive deleted]/;
print $MESG_LOG: $mesg;
}
-
+
multi sub mesg ($mesg of Str) {
print $MESG_LOG: $mesg;
}