>Just to note: in version 2 of the RFC, it's associated with the pad of
>the block in which the C<each> appears.

>   > then what are you going to do?  

>The short answer is that there is no "manual" reset of iterators.

I am concerned about that.

    sub fn(\%) {
        my $href = shift;
        while (my($k,$v) = each %$href) {
            return if something's funny;
        } 
    } 

Now, imagine you call

    fn(%foo);
    fn(%bar);

and there's a premature exit.  Isn't the second fn() going to not
only be at the wrong spot, but still worse, at the wrong hash?

Or do you plan for all block exits to clear all their iterators?

What happens then in this code:

    for my $hr (\(%foo, %bar, %glarch)) {
        push @first_keys, scalar each %$hr;
    } 

There's no block exit there.

--tom

Reply via email to