On Wed, Aug 08, 2001 at 08:25:57AM +1000, Damian Conway wrote:
>    > More questions regarding the new 'given when' construct.
>    > [ LABEL: ] given ( expr_1 ) {
>    >            [ when expr_2 : block ...]
>    >            expr_n [;]
>    >             }
> 
> Not required. It's:
> 
>         [ LABEL: ] given ( expr_1 ) {
>                 [statement ; ...]
>                 [statement]
>         }
> 
> A C<when> statement is just a particular kind of statement.

Hmm.  C<when> seems to be synonymous with C<if> (almost)

        when ($foo) { ... }             # Does this mean if ($_ eq $foo)?
         if  ($foo) { ... }

However ...

> A C<next> within a C<when>'s block causes control to jump to the next
> statement in the innermost surrounding <given>'s block.

What happens to C<next> within stand-alone C<when> statements? Do
C<when> statements never stand alone? And if C<when> and C<if> are
mostly synonymous, the differing behavious of C<next> within them would
be confusing.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to