develooper Front page | perl.perl6.language | Postings from March 2009

r25775 - docs/Perl6/Spec

Thread Next
March 9, 2009 15:46
r25775 - docs/Perl6/Spec
Message ID:
Author: lwall
Date: 2009-03-09 23:46:07 +0100 (Mon, 09 Mar 2009)
New Revision: 25775

more result object demotion

Modified: docs/Perl6/Spec/S05-regex.pod
--- docs/Perl6/Spec/S05-regex.pod	2009-03-09 22:33:54 UTC (rev 25774)
+++ docs/Perl6/Spec/S05-regex.pod	2009-03-09 22:46:07 UTC (rev 25775)
@@ -35,7 +35,7 @@
 =head1 New match result and capture variables
-The underlying match result object is now available as the C<$/>
+The underlying match object is now available via the C<$/>
 variable, which is implicitly lexically scoped.  All user access to the
 most recent match is through this variable, even when
 it doesn't look like it.  The individual capture variables (such as C<$0>,
@@ -781,7 +781,7 @@
 This has the effect of capturing the square root of the numified string,
 instead of the string.  The C<Remainder> part is matched but is not returned
-unless the first C<make> is later overridden by another C<make>.
+as part of the result object unless the first C<make> is later overridden by another C<make>.
 These closures are invoked with a topic (C<$_>) of the current match
 state (a C<Cursor> object).  Within a closure, the instantaneous
@@ -2461,16 +2461,6 @@
 In this case the result object is always a string when doing string
 matching, and a list of one or more elements when doing array matching.
-Additionally, the C<Match> object delegates its C<coerce> calls
-(such as C<+$match> and C<~$match>) to its underlying result object.
-The only exception is that C<Match> handles boolean coercion itself,
-which returns whether the match had succeeded at least once.
-This means that these two work the same:
-    / <moose> { make $moose as Moose } /
-    / <moose> { make $$moose as Moose } /
 =item *
 When used as an array, a C<Match> object pretends to be an array of all
@@ -2591,6 +2581,8 @@
     say $();                      # says 'bar'
+The result object is available in the C<Match> object via a C<< .<?> >> lookup.
 =head2 Subpattern captures

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About