-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signature introspection API #64
Comments
I looked at the perl5i stuff a bit, but I'm still not sure how it actually works. So you have code such as:
and |
That need not be Method::Signature's concern. perl5i can take care of that. It does it's trick using autobox. In your code below, $foo isn't an object, Anyhow, all Method::Signatures needs to provide is the object and maybe the
|
Oh, I see. Except ... in that case, the |
We'll probably have to provide a method to get the signature for a given |
Okay, got it now. That should be doable moderatey easily, although (as you say) I think this will be dependent on #31. |
perl5i has the ability to introspect signatures to ask questions like "how many positional parameters do you take?" This is useful for creating things like loops that now how many elements to iterate at a time.
perl5i's signature API is very simple right now. You can ask it for the original signature, a list of parameters, how many positional vs named parameters there are, what the invocant is and if its a method.
Method::Signatures can do that and more. It will fall out of what we need internally for #30 and #31.
The functional requirement is to allow perl5i to use Method::Signatures, but I think its very useful.
The text was updated successfully, but these errors were encountered: