Still dies on 5.12.0. http://rt.perl.org/rt3/Ticket/Display.html?id=6813 On Thu Apr 12 08:27:58 2001, RT_System wrote: > >jpinyan@sushi.riskgrades.com wrote: > >> > >[snip] > >> sub STORE { > >> my ($self, $val) = @_; > >> local $_ = $self->{VAL} = $val; > >> $self->{CODE}->() ? $_ : last; # <-- bad news > >> } > >[snip] > >> When I run this code, I'm told I can't call last() from outside a loop > >> block. > > > >That is only a warning. Your code should still work as you expect. One > >other way to suppress the warning (not mentioned on fwp) would be to put > > No, that is not a warning. A warning is when you use last() to get out of > a loop while in a subroutine. This message is a fatal error: > > Can't "last" outside a loop block at ensure line 23. > > It occurs because when Perl gets to STORE via tie() magic, it > "forgets" itself. -- Alexandr Ciornii, http://chorny.netThread Previous