runrig,
To me the only clumsy thing is that you have to supply those ugly arguments
In assignment, I would have assumed you could return a variable that was going to get assigned to but couldn't figure out how to do this myself. Apparently, lnoreturn needs to be on a line all by itself so you are forced to do the assignment yourself inside the sub. Perhaps this just takes some getting used to.
If I were going to dream up some syntax, I would create a new predefined variable - let's call it %LVAL. It would need to be localized and bound to the scope of the currently executed sub, much like $| is bound to the currently selected filehandle. It would have keys you could use to get at the things you wanted. Perhaps you could even define additional code refs during sub declaration for your validation routine, and any pre/post processing you wanted to do that would be handled for you automagically.
In any account, I have accomplished what I had hoped to. People are talking about it. Not just in a p5 context, but also in a p6 context. This is a good thing. It sounds like some feel that the current p6 design isn't much better than the p5.
|