in reply to Re: Operator overloading with returning lists?
in thread Operator overloading with returning lists?
Thanks for all your answers. Contextual::Return was a very nice idea. Unfortunately it did not work for the operator. Although C::Return allows more precise detection than the normal wantarray it's still the wrong context in which the expression is evaluated, so I could not get to to use in anything else than SCALAR.
I heard that '~~' should slightly change its semantics in 5.10.1, maybe it would be possible to even more enhance it with context awareness, e.g. in order to harmonize it with the Perl6 operator (do those allow context detection?). I should now ask in p5p ...
Thanks again.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Operator overloading with returning lists?
by LanX (Saint) on Nov 30, 2008 at 17:43 UTC | |
by renormalist (Sexton) on Dec 02, 2008 at 13:45 UTC | |
by ikegami (Patriarch) on Dec 02, 2008 at 14:34 UTC | |
by renormalist (Sexton) on Dec 04, 2008 at 20:15 UTC |