[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] awww, no fun :(



Jeff Pinyan wrote:
> 
> sub STORE {
>   my ($self, $val) = @_;
>   local $_ = $self->{VAL} = $val;
>   $self->{CODE}->() ? $_ : last;

Try changing last to die and ...

> }
> 
> package main;
> use strict;
> 
> sub ensure (&@) {
>   my ($cref, $obj, $loop) = @_;
>   tied($$obj)->{CODE} = $cref;
>   { $loop->(); redo }

   eval { { $loop->(); redo } };

> }

-- 
Rick Delaney
rick.delaney@home.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe