On Thu Jan 23 20:37:24 2014, haarg wrote:
Show quoted text> On Thu Jan 23 10:29:15 2014, RIBASUSHI wrote:
> > Currently it is not possible to write:
> >
> > has foo => (
> > is => ro,
> > default => quote_sub '[]',
> > lazy => 1,
> > );
> >
> > because quote_sub will slurp the rest of the arguments, and "lazy =>
> > 1" will be silently lost. Is there a reason we aren't declaring a ($)
> > prototype on our imported functions to prevent this?
> >
> > Thought occured while writing
https://github.com/dbsrgits/dbix-
> > class/commit/bf302897b5
> >
> > Cheers
>
> quote_sub accepts up to 4 parameters, so a prototype won't be useful.
Indeed, a misread on my part. I was certain it was a single-arg function.
Show quoted text> A separate sub would be required, and I don't know if it's a useful
> enough addition to justify it.
Given it's an import, and given it is most-useful in has() declarations... I for one would like a qsub ($) { ... } to use in such cases... Wonder what mst thinks.
Anyhow - this is a wishlist as already marked, and the implementation is beyond trivial. It's a matter of executive decision :)