Skip to content

parse_subsignature() gets confused about empty parens () #17689

Open
@leonerd

Description

@leonerd

The newly-added (perl 5.31.3) core function of parse_subsignature() is for parsing the inside contents of a sub signature; for example it will extract the $x, $y part of

sub foo($x, $y) { $x + $y }

When facing an empty paren () it however fails; it increments the value of PL_parser->error_count despite yielding a valid op tree for the empty sig. This is currently causing a CPAN module failure:

https://rt.cpan.org/Ticket/Display.html?id=132284

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions