Skip to content
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

WISHLIST: Add signature() method to PPI::Statement::Sub #305

Open
trwyant opened this issue Nov 30, 2024 · 0 comments
Open

WISHLIST: Add signature() method to PPI::Statement::Sub #305

trwyant opened this issue Nov 30, 2024 · 0 comments

Comments

@trwyant
Copy link
Contributor

trwyant commented Nov 30, 2024

When drafting a Perl::Critic policy to forbid @_ and @ARG in subroutines with signatures, it would be helpful (though obviously not essential) to have PPI::Statement::Sub->signature(). I believe that (unlike PPI::Statement::Sub->prototype()) it should return the actual PPI::Statement::Signature object if it exists, rather than just the content of the object. But my use case just needs to know whether the subroutine has a signature, so any return whose Boolean value contains this information works for me.

I am willing to do a pull request for any such functionality that we can agree on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant