Closed tobyink closed 11 years ago
Brain dump: I don't like that this API only accepts function names, not refs, and I don't like that it's global and orthogonal to scopes/keywords. That is, I believe a given keyword should always parse its type annotations with the same function.
Alternative branch pushed: https://github.com/mauke/Function-Parameters/tree/custom-type-reification - thoughts?
Closing pull request because yours is better.
Re the keyword customization API, yes it's unwieldly, but personally I'm not bothered by it. After all, you can subclass Function::Parameters just fine; override import
to insert your own defaults and then never need to bother with that API again.
This allows non-parenthesised type constraints to be looked up via a function other than
Moose::Util::TypeConstraints::find_or_create_isa_type_constraint
. There is no API exposed for it; you need to twiddle%^H
in aBEGIN
block. The reason being that this is intended for people subclassing or wrapping Function::Parameters; not for most end users. This would be really handy for the benefit of MooX::Aspartame.