Damian Conway writes:
> > sub foo :lvalue { $foo }
> > post foo { die if $foo == 5 }
> >
> > eval {
> > foo() = 5;
> > };
>
> Postconditions on lvalue subs are not tested until the end of the complete
> expression in which the sub is called.
But that won't change the fact that they are called *after* the lvalue
has changed. If they detect a problem, they can't unroll the change.
When you are passed the new value as an argument, you can die before
a change is made.
Nat
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameter... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameter... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameter... Hildo Biersma
- Re: RFC 118 (v1) lvalue subs: parameter... Nathan Torkington
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Buddha Buck
- Merge RFC's 107 and 118 (was Re: RFC 118 (v1) l... Nathan Wiger
- Re: RFC 118 (v1) lvalue subs: parameters, explicit assig... Damian Conway
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Johan Vromans
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Buddha Buck
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Chaim Frenkel
- Re: RFC 118 (v1) lvalue subs: parameters, explicit ... Nathan Wiger
