Skip to content

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

Open
@trwyant

Description

@trwyant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions