in reply to Re: Side Context in an 'lvalue' Subroutine
in thread Side Context in an 'lvalue' Subroutine
Internally, there is a function from the Wait.xs component called 'want_lvalue', which is really all I need. If it were assigned a default parameter value (it relates to stack depth) then it could be used like so:use Want; sub fooz : lvalue { defined ($foo_new)? $foo_new : (want('LVALUE','ASSIGN')? $foo_new = $foo : $foo); }
This does seem to be a lot neater, though not currently implemented.use Want; sub fooz : lvalue { defined ($foo_new)? $foo_new : want_lvalue? $foo_new = $foo : $foo); }
|
|---|