FAQ
Hello~

Here is a snippet from the Pugs test suite:

{
my $ret = eval 'do 42';
ok(!$ret, 'do EXPR should not work', :todo);
# XXX or should it? Feels weird...
}

which motivated me to create the following patch for S04:

Index: D:/projects/Perl6-Syn/S04.pod

===================================================================

--- D:/projects/Perl6-Syn/S04.pod (revision 10955)

+++ D:/projects/Perl6-Syn/S04.pod (working copy)

@@ -349,8 +349,9 @@


$x = do if $a { $b } else { $c };

-This construct only allows you to prefix a statement. If you want to
-continue the expression after the statement you must use the curly form.
+This construct only allows you to prefix I<one> statement (or an expression).
+If you want to continue the expression after the statement you must use the
+curly form.

Since C<do> is defined as going in front of a statement, it follows
that it can always be followed by a statement label. This is particularly


Cheers,
Agent

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
categoriesperl
postedAug 15, '06 at 12:11p
activeAug 15, '06 at 12:11p
posts1
users1
websiteperl6.org

1 user in discussion

Agent Zhang: 1 post

People

Translate

site design / logo © 2021 Grokbase